You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there are valid use-cases for having an object in multiple groups. E.g. you have two groups that you alternatively hide. The object in both groups will stay visible. Think of a multiple button-bars, all with a shared OK-button.
In your example you are adding the object to the same group twice. That is a bit different and might be considered as an error.
For the re-used 'Okay' button I think a Bitmap and TileGrid are more likely to be in use than a Vectorio shape. In the case of Bitmap and TileGrid you can have multiple TileGrids that share the same Bitmap, so you could make two TileGrids that re-use the same Ok button graphic Bitmap file and put them in two different Groups.
I haven't traced through all of the code to be sure, but I think that both TileGrid and Vectorio shapes have internal variables related to dirty region and refreshing that are used by logic that is written to assume that there is only a single instance of the thing, and it will be in only a single Group.
If a thing were in multiple Groups it would need to keep straight which instances of itself are dirty and need to be re-drawn on the display whereas I think right now it has only a concept of dirty or not, and not have a concept of "is this instance dirty, and is that other instance dirty independently."
CircuitPython version and board name
Code/REPL
Behavior
vectorio
shapes can be added to groups multiple times causing the code to freeze on refresh and not react to ctrl-C (but not crash USB).It seems like it should raise "Layer already in a group".
The text was updated successfully, but these errors were encountered: