Invert Selection and Nested Groups
ricecake started this discussion in Bug Reporting

I came across an issue where I got unexpected behavior, but I can understand the logic with what it is currently doing.

As a minimal example, here is a setup to reproduce the issue. I have placed 2 red bricks, 2 green bricks, and 2 blue bricks in the workspace. I group the 2 red bricks together (call the group "Red"), the 2 green bricks ("Green"), and the 2 blue bricks ("Blue"). I then group the Red and Green groups together, and call it "Christmas".

Now, I click on the "Christmas" group in the Groups box to select that group (the "Red" and "Green" bricks), then choose Invert from the selection tools menu. The result is that all 6 bricks are now selected, instead of just the blue bricks. This seems to be because when the "Christmas" group is selected, the "Red" and "Green" subgroups are not selected, and so when inverting, it selects "Red" and "Green" as well as "Blue".

5 replies · Page 1 of 1
Avatar of Scrubs
Administrator

Hello,
Funny. I tried it and if all the groups are locked, it works as expected. If you unlock the groups, the behavior is the one you described. I will have to go back in the code at some stage to find the glitch.

It seems to work as long as the top level group is locked (Christmas in the above) (I left Blue unlocked and it was fine). I have not tested with further nesting of groups.

Thanks for the quick reply and for looking into it! 😃

Interesting example and good catch. 😛

I was thinking about it, and I think that it would solve it if when you selected a group, then nested groups also automatically get selected.

Was going to report the same issue, but glad I found this workaround.

Advertising
4 participants
Avatar of Scrubs
Avatar of Sim

LEGO, the LEGO logo, the Minifigure, and the Brick and Knob configurations are trademarks of the LEGO Group of Companies. ©2024 The LEGO Group.

Mecabricks, the Mecabricks logo and all content not covered by The LEGO Group's copyright is, unless otherwise stated, ©2011-2024 Mecabricks.