Opened 14 years ago

Closed 13 years ago

#2938 closed patch (fixed)

Add advance selection tools to core

Reported by: jpalmer Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.6.0
Component: MapCanvas Version: Trunk
Keywords: maptool select Cc: timlinux, hdus
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

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.

Attachments (6)

select_tools_core.diff (75.1 KB ) - added by jpalmer 14 years ago.
images.zip (13.4 KB ) - added by jpalmer 14 years ago.
select_feature_option.diff (6.0 KB ) - added by jpalmer 14 years ago.
options.png (15.2 KB ) - added by jpalmer 14 years ago.
select_tools_update.diff (7.9 KB ) - added by jpalmer 13 years ago.
Update to inc.lude tooltips, new modifiers and difference function.
select_tools_tooltips.diff (3.0 KB ) - added by jpalmer 13 years ago.
Tooltip patch to be applied after 1.6 has been released

Download all attachments as: .zip

Change History (16)

by jpalmer, 14 years ago

Attachment: select_tools_core.diff added

by jpalmer, 14 years ago

Attachment: images.zip added

comment:1 by jef, 14 years ago

Resolution: fixed
Status: newclosed

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

comment:2 by timlinux, 14 years ago

Resolution: fixed
Status: closedreopened

Hi all

Regarding r14071 (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

comment:3 by timlinux, 14 years ago

Cc: timlinux added

in reply to:  2 comment:4 by jef, 14 years ago

Replying to 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.

r14101 addresses some of these. I made a flyout toolbutton and submenus for the selection and measure tools.

comment:5 by jpalmer, 14 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.

comment:6 by timlinux, 14 years ago

Cc: hdus added

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

in reply to:  6 comment:7 by jef, 14 years ago

Replying to 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).

by jpalmer, 14 years ago

Attachment: select_feature_option.diff added

in reply to:  6 comment:8 by jpalmer, 14 years ago

Replying to 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

by jpalmer, 14 years ago

Attachment: options.png added

by jpalmer, 13 years ago

Attachment: select_tools_update.diff added

Update to inc.lude tooltips, new modifiers and difference function.

comment:9 by mhugent, 13 years ago

Applied non-string parts of patch in r14497

by jpalmer, 13 years ago

Attachment: select_tools_tooltips.diff added

Tooltip patch to be applied after 1.6 has been released

comment:10 by borysiasty, 13 years ago

Resolution: fixed
Status: reopenedclosed

applied in r14820

Note: See TracTickets for help on using tickets.