GNOME Bugzilla – Bug 167047
improve selection of overlapping elements: rotating selection
Last modified: 2005-04-06 23:03:50 UTC
I would be fine to have a rotating selection mode to be able to choose elements that are stacked. Now we can select a parent widget using shift-click, but we could extend this idea, so while you have shift pressed or until you do right-click, each normal click highlights one of the stacked objects and rotates between them until the rotation is broken and the object gets selected. The highlighted widget is displayed on the statusbar as "Widget01 highlighted" and when it gets selected it is shown as "Widget01 selected". It would be great also having a visual tip of the highlighted status (for instance, with a thick coloured border around the highlighted widget) as well as the textual tip given on the status bar. For example: - We have objects A, B and C piled up and with A on top and C at the bottom. - if we normal click on the intersection area then just object A is selected and "A selected" is shown in the statusbar as it is the topmost object on the pile. - But, if we shift+click on the intersection area then A is highlighted and "A highlighted" is shown on the statusbar. If we keep clicking again then B is highlighted and "B highlighted" is displayed on the statusbar. If we do it once again we have C, and next we have A back as highlighted, then B, then C... - To get one of these selected and break the circular selection we just right click or end pressing the shift key (what we like best) and the currently highlighted object gets fully selected, so on the statusbar we can read "[ABC] selected". This way you should only need to use the widget treeview to operate on large branchs, to copy, cut or move them, but for normal operation you wouldn't need it... so we can get that screen space back (maybe leaving an expander to ocasionally show it).
Created attachment 38747 [details] [review] Patch implementing a simplified version of the feature I've created a patch that implements a simplified version of the feature requested. It makes Gazpacho behave as glade2 in this respect. When you shift click on a widget it will select the parent of the selected widget (if the selected widget is in the current branch of the tree). If the selected widget is a toplevel widget we select the leaf widget. If no widgets have been selected (in the current tree) we select the leaf widget. I've put the circle_select method in utils.py not sure if that's ok, but I couldn't think of another place.
There is a problem with this patch I haven't being able to fix: If the user clicks very fast the selection goes weird. No idea of what is going on. I applied the patch but the bug is not fixed since we have this race condition
I'll take a look at it. One thing I noticed is that it only seems to affect widgets, not placeholders (unless I just was lucky).
That's true, only with widgets
Created attachment 39774 [details] [review] Patch for the race bug We just had to make sure not to call circle_select on double and tripple click events. The placeholder code already did this, that's why it worked from the beginning.
Thanks Mattias, you did a great job with this one