Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not toggle between "shape digitization tool" (circle, square, etc) and the standard "Add polygon feature" #49541

Closed
1 of 2 tasks
Nicholson7979 opened this issue Aug 1, 2022 · 18 comments · Fixed by #50691
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality

Comments

@Nicholson7979
Copy link

What is the bug or the crash?

Can not toggle between "shape digitization tool" (circle, square, etc) and the standard "Add polygon feature". After selecting one of the shape digitization tools the app can not revert back to using the freeform "add polygon feature". I had to install earlier version 3.22.9

Steps to reproduce the issue

Create a circle using the shape digitization panel and select the freeform polygon tool. (even after switching edit mode on/off)

Versions

3.26.0 and 3.26.1

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@Nicholson7979 Nicholson7979 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Aug 1, 2022
@pigreco
Copy link
Contributor

pigreco commented Aug 2, 2022

I confirm problem.

OSGeo4W64 v2 QGIS 3.26.1 Win 10 PRO

@pigreco pigreco added Regression Something which used to work, but doesn't anymore Digitizing Related to feature digitizing map tools or functionality labels Aug 2, 2022
@liuxsdev
Copy link

liuxsdev commented Sep 1, 2022

Same problem in QGIS 3.26.1

@agiudiceandrea
Copy link
Contributor

Confirmed on Windows 10 with QGIS 3.27.0-Master (c6eca78) and QGIS 3.26.3.

@pigreco
Copy link
Contributor

pigreco commented Sep 30, 2022

I confirm problem.

OSGeo4W64 v2 QGIS 3.26.3 Win 10 PRO

@agiudiceandrea
Copy link
Contributor

It seems to me this is related to #46687,

@DelazJ
Copy link
Contributor

DelazJ commented Oct 1, 2022

I'm failing to understand the issue. The digitizing tools have been refactored and digitize shape is one of the methods of drawing polygons (using "Add polygon feature" tool) along with curve, segment and freehand methods. It is a sub option of the "add polygon" so you can't expect to "switch from one to the other". Please give a read to https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html#adding-features and https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html#geometry-editing-techniques
I think here you just need to switch to "Digitize with segment"
image

@DelazJ DelazJ added the Feedback Waiting on the submitter for answers label Oct 1, 2022
@pigreco pigreco removed the Regression Something which used to work, but doesn't anymore label Oct 1, 2022
@pigreco
Copy link
Contributor

pigreco commented Oct 1, 2022

I confirm that it works, you need to switch from Digitize Shape to Digitize Segment.
Thank you @DelazJ
2022-10-01_18h38_25

OSGeo4W64 Win 10 PRO QGIS 3.26.3 e master

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Oct 1, 2022

@DelazJ, I think this is a GUI/UX usability bug and regression. Please consider this scenario: in a new QGIS user profile the "Digitizing" toolbar is enabled by default while the "Shape Digitizing" and the "Advanced Digitizing" toolbars are not enabled; the user starts the editing of a polygon vector layer:

  • pre refactoring of QgsMapToolCapture to integrate shape map tools #46687:

    • digitize a "normal" polygon feature: click on the "Add Polygon Feature" button in the "Digitizing" toolbar
    • digitize a "shape": activate the "Shape Digitizing" toolbar and then click on one of the shapes buttons in such toolbar
    • digitize a "normal" polygon feature: click on the "Add Polygon Feature" button in the "Digitizing" toolbar
  • post refactoring of QgsMapToolCapture to integrate shape map tools #46687:

    • digitize a "normal" polygon feature: click on the "Add Polygon Feature" button in the "Digitizing" toolbar
    • digitize a "shape": activate the "Shape Digitizing" toolbar and then click on one of the shapes buttons in such toolbar
    • digitize a "normal" polygon feature: you now - not so obviously - need to activate another toolbar, the "Advanced Digitizing" toolbar, and then you need to click on the "Digitize Shape" button and then select the "Digitize with Segment" option.

It seems to me the post #46687 behaviour is a GUI/UX usability bug and regression: to use the "Shape Digitizing" methods you need to only use the "Shape Digitizing" toolbar; but to deactivate such method and return to the normal "Digitizing" method then the "Digitizing" and "Shape Digitizing" toolbars are not enough an you need to also activate a third toolbar.

I think that some possible solutions would be:

  • A) put the "Digitize Shape" / "Digitize with Segment" / ... button also in the "Shape Digitizing" toolbar
  • B) merge the "Shape Digitizing" toolbar and the "Advanced Digitizing" toolbar
  • C) mimic the previous behavior and deactivate the "Add Polygon Feature" button in the "Digitize" toolbar when the user clicks on one of the shapes buttons in the "Shape Digitizing" toolbar so he can again click on the "Add Polygon Feature" button in the "Digitize" toolbar when he wants to return to the normal digitizing method

@3nids 3nids self-assigned this Oct 2, 2022
@3nids
Copy link
Member

3nids commented Oct 2, 2022

Some other approaches would be to:

  • D make the advanced digitizing toolbar visible as soon as you digitize a shape
  • E like A, but only show it if the advanced toolbar is not shown
  • F move the digitizing mode button to the simple digitizing toolbar

Regarding C, I personally don't like it:

  • the checking/unchecking of the button is automatically done by map canvas on the button (action) set for this map tool (this will require some specific code)
  • it is based on the specific case of the add feature tool (which button/action is not in the advanced digitizing toolbar)

A: I'm -0: while it makes a lot of sense to have this it will make the UX too crowded.

My personal preference would be:

  1. B (merging the 2 toolbars): this is the simplest solution (it might require a bit of work to have the actions correctly registered, so one could still remove the button using the customization tool)
  2. E (move the mode button from advanced toolbar to shape tool bar when required): a bit of code to move the action, but it might be the best in terms of UX.

I'd like to have some UX experts here for another opinion. ping @nirvn

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Oct 2, 2022

@3nids, thanks for looking at this.
Since we're at it, I think there is also another inconsistency about the "Digitize with curve" method in the "Advanced Digitizing" toolbar and the "Circular string by radius" tool in the "Shape Digitizing" toolbar: they actually seems two quite similar methods/tools to add circular segments, but now they are selectable in two different toolbars and two different modes.

@3nids
Copy link
Member

3nids commented Oct 2, 2022

@agiudiceandrea can you create a new issue for this one?

@DelazJ
Copy link
Contributor

DelazJ commented Oct 2, 2022

@agiudiceandrea @3nids Not sure if/how they overlap, but see #49783 and #49784

@nirvn
Copy link
Contributor

nirvn commented Oct 3, 2022

I'd vote for the F option; IMHO the button would best fit sitting in between the Add {point, line, polygon} feature and the vertex node buttons.

It'd likely feel odd in the shape digitizing toolbar as we have quite a few modes in there that aren't shape-bound.

As for moving the button around across toolbars based on visibility, I can see it being slightly confusing for newcomers, and a tiny bit harder to properly document.

@3nids
Copy link
Member

3nids commented Oct 4, 2022

F is the easy approach, probably the cleanest UX wise and without any code addition. The only drawback is the small added complexity to the "simple" digitizing toolbar, but it brings the modes (freehand, shapes) to light.

If there are no objections, I'll implement this.

@github-actions
Copy link

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Oct 19, 2022
@agiudiceandrea agiudiceandrea removed Feedback Waiting on the submitter for answers stale Uh oh! Seems this work is abandoned, and the PR is about to close. labels Oct 22, 2022
@agiudiceandrea
Copy link
Contributor

@3nids any news on this issue? It's occurring also with QGIS 3.28.0.

@3nids
Copy link
Member

3nids commented Oct 25, 2022

see #50691

@ddettrick
Copy link

I like option C you click the edit button the line or polygon button and then if you want shapecontrol click on that too. You can then click on shapecontorl to turn it off, if you wish t ohand draw a shape, point or line. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants