Feature request #2938

Add advance selection tools to core

Added by Jeremy Palmer about 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Map Canvas
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12998

Description

The current selection tool within QGIS can only select features by rectangle intersect. This is inadequate for many GIS selection. Attached is a patch that adds more selection tools into the core app to aid users with more advanced selection problems.

This patch is partially inspired by Barry Rowlingson's SelectPlus python plugin, but adds a single selection tool, provides a toolbar with icons, and gives the option to select features either by intersects or contains.

This patch makes a significant change from the current select by interest methodology. Instead by default, each select tool (except for single select) selects features by geometric contains. If the user wants to select by intersects the ALT modifier key must be pressed at the same time. I feel this default behaviour is more in line with other mapping/GIS systems.

select_tools_core.diff Magnifier (75.1 KB) Jeremy Palmer, 2010-08-11 10:14 PM

images.zip (13.4 KB) Jeremy Palmer, 2010-08-11 10:14 PM

select_feature_option.diff Magnifier (5.99 KB) Jeremy Palmer, 2010-08-18 09:21 PM

options.png (15.2 KB) Jeremy Palmer, 2010-08-18 09:30 PM

select_tools_update.diff Magnifier - Update to inc.lude tooltips, new modifiers and difference function. (7.91 KB) Jeremy Palmer, 2010-11-03 01:48 AM

select_tools_tooltips.diff Magnifier - Tooltip patch to be applied after 1.6 has been released (2.97 KB) Jeremy Palmer, 2010-11-03 01:17 PM

History

#1 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

applied in v14071 with a little fix when on-the-fly-projection is off. Nice, thanks Jeremy.

#2 Updated by Tim Sutton about 10 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Hi all

Regarding 29fa6f29 (SVN r14072) (see also #1949) which adds the new selection tools, there are a number of issues with this change.

- I think they consume too much toolbar space
- In the view menu, the select new tool actions cause the menus after the view menu to be unusable on gnome on screens <= 768px high since you can not move the adjacent menus after the view menu (now longer with the select tools) is opened.
- In the course we are running here the tools are confusing users
- Selection seems to break some features like rotating point symbols interactively when the layer is being edited
- Using the ALT modifier for selection using intersection rather than enclosure is not a good choice since on linux Alt-mousedrag moves the whole window container
- The tooltips should indicate the modifier needed for intersection (although it might be nicer to have intersection the default behaviour as it is consistent with existing user experience and make the enclosure behaviour activated by a modifier key).

My suggestion to address the above is as follows:

- create a view submenu for the additional tools
- display only the select by rectangle tool and the deselect tool in the toolbar (rest need activation via the menu)
- make the rectangle tool select by single click as before (removing the need for the single click icon)
- revert the default behaviour to intersection and make enclosure active by modifier key.

I am reopening this ticket in the hopes that these issues can be addressed.

Best regards

Tim

#3 Updated by Jürgen Fischer about 10 years ago

Replying to [comment:2 timlinux]:

- create a view submenu for the additional tools
- display only the select by rectangle tool and the deselect tool in the toolbar (rest need activation via the menu)
- make the rectangle tool select by single click as before (removing the need for the single click icon)
- revert the default behaviour to intersection and make enclosure active by modifier key.

62119607 (SVN r14102) addresses some of these. I made a flyout toolbutton and submenus for the selection and measure tools.

#4 Updated by Jeremy Palmer about 10 years ago

Attached is a patch that allows users to define the default way for selecting features. Intersects is the default so the user experience is now consistent with previous versions of QGIS.

Tim could you please provide more details about the issues you are having with new select tools and rotating point symbols.

#5 Updated by Tim Sutton about 10 years ago

Hi

For rotating point symbols, you edit a point layer, and then use the symbol rotation tool to rotate the selected point to your specified angle. Currently this does not work with the new selection tools.

Wrt the flyout tool button, I think they are bad usability - it requires two clicks to activate a tool which is no more efficient than using the menus. It would be nicer to have a single tool displayed (rectangle selection) and the rest stowed in the view menu.

I tried your patch above. The radio buttons would be better placed on the map tools panel than the overlay panel.

Also please note the issue with Alt clicking and dragging remains - alt is not a usable modifier key for mouse click & drag actions on unix since in most window managers it moves the entire window.

Best regards

Tim

#6 Updated by Jürgen Fischer about 10 years ago

Replying to [comment:6 timlinux]:

For rotating point symbols, you edit a point layer, and then use the symbol
rotation tool to rotate the selected point to your specified angle. Currently
this does not work with the new selection tools.

Are you sure that you don't use a symbology-ng renderer? Looks like those
don't work with the rotation tool.

Wrt the flyout tool button, I think they are bad usability - it requires two
clicks to activate a tool which is no more efficient than using the menus. It
would be nicer to have a single tool displayed (rectangle selection) and the
rest stowed in the view menu.

The tool buttons are now delayed (the default).

#7 Updated by Jeremy Palmer about 10 years ago

Replying to [comment:6 timlinux]:

For rotating point symbols, you edit a point layer, and then use the symbol rotation tool to rotate the selected point to your specified angle. Currently this does not work with the new selection tools.

I think you must be using the v2 renderer, because it works for me. Note you don't even need to use the selection tools to use this maptool.

I tried your patch above. The radio buttons would be better placed on the map tools panel than the overlay panel.

hmm, weird in my compiled version using the patch under win32/VC2008/QT4.5.2 it shows up in the map tools panel. See attached image. I did notice a little text case bug in the default value for the new option. I have now uploaded a new version.

Also please note the issue with Alt clicking and dragging remains - alt is not a usable modifier key for mouse click & drag actions on unix since in most window managers it moves the entire window.

Note sure what to do here as there are no more modifier keys left as the Shift and Ctrl keys are already in use. We could start allowing any keyboard shortcut, but that could get messy with the user definable short-cut actions already in place. Any ideas?

Cheers
Jeremy

#8 Updated by Marco Hugentobler almost 10 years ago

Applied non-string parts of patch in 485ae192 (SVN r14498)

#9 Updated by Borys Jurgiel almost 10 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

applied in

Also available in: Atom PDF