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

Digitizing: "Add Ring" tool doesn't consider all the overlapping features #23113

Closed
qgib opened this issue Jun 29, 2016 · 9 comments · Fixed by #50447
Closed

Digitizing: "Add Ring" tool doesn't consider all the overlapping features #23113

qgib opened this issue Jun 29, 2016 · 9 comments · Fixed by #50447
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

@qgib
Copy link
Contributor

qgib commented Jun 29, 2016

Author Name: Harrissou Santanna (@DelazJ)
Original Redmine Issue: 15174
Affected QGIS version: 3.0.0
Redmine category:digitising


Open a layer, toggle to edition and add two polygon features that overlap.
select the "Add ring" tool and add a ring where the two features overlap.
Only the first feature contains a hole, not the second one.
If the features are selected beforehand, only the first feature is again pierced, ignoring the selection of the second feature.

I think in both case, both features should contain holes.( The Split features would have split both features - selected or not)


Related issue(s): #23114 (relates)
Redmine related issue(s): 15175


@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 0
  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2018

Author Name: Harrissou Santanna (@DelazJ)


@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2018

Author Name: Harrissou Santanna (@DelazJ)


  • version was changed from 2.14.3 to 3.0.0
  • description was changed from Open a layer, toggle to edition and add two polygon features that overlap.
    select the "Add ring" tool and add a ring where the two features overlap.
    Only the first feature contains a hole, not the second one.
    If the features are selected beforehand, only the first feature is again pierced, ignoring the selection of the second feature.

I think in both case, both features should contain holes.( The Split features would have split both features - selected or not) to Open a layer, toggle to edition and add two polygon features that overlap.
select the "Add ring" tool and add a ring where the two features overlap.
Only the first feature contains a hole, not the second one.
If the features are selected beforehand, only the first feature is again pierced, ignoring the selection of the second feature.

I think in both case, both features should contain holes.( The Split features would have split both features - selected or not)

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • status_id was changed from Open to Closed
  • resolution was changed from to end of life

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Closed to Open
  • resolution was changed from end of life to

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality labels May 25, 2019
@Pedro-Murteira
Copy link

Pedro-Murteira commented Nov 26, 2021

@DelazJ This bug no longer occurs on versions 3.16.14 and 3.22.1. (Tested on both Linux UBUNTU 20.04 and windows 10).

@gioman gioman added the Feedback Waiting on the submitter for answers label Nov 26, 2021
@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 Dec 11, 2021
@DelazJ
Copy link
Contributor

DelazJ commented Dec 12, 2021

Tested on 3.22.1 Ubuntu 20.04 and still occurs (only a single polygon is pierced while both should (in both cases: selected or not)

AddRingFirstOnly.mp4

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Dec 12, 2021
@gioman gioman removed the Feedback Waiting on the submitter for answers label Dec 13, 2021
@lbartoletti lbartoletti self-assigned this Sep 20, 2022
@lbartoletti
Copy link
Member

Today, you can only add a ring on the current layer.

I guess, one wants to add a ring also on selected features for the other layers. I'll try to rewrite it like this.

lbartoletti added a commit to lbartoletti/QGIS that referenced this issue Sep 21, 2022
Originally, the tool only worked for the active layer.
This PR propose to iterate on all layers and add the ring on all layers.

Fixes qgis#23113
lbartoletti added a commit to lbartoletti/QGIS that referenced this issue Oct 3, 2022
The `QgsMapToolAddRing` adds a ring through the `addRing` method of
`QgsVectorLayerEditUtils` called by this of `QgsVectorLayer`.

The bug described in qgis#23113 indicates that only one of the entities receives the
ring addition when using the map tool.

This is consistent with the documentation of the `addRing` methods.
So, it is by design that the tool works like this.

However, as stated in the ticket, it is best to add the ring to all entities.

In order to avoid an api break, I added a new addMultiRing method that adds the ring on all entities.

Fixes qgis#23113
lbartoletti added a commit to lbartoletti/QGIS that referenced this issue Oct 13, 2022
The `QgsMapToolAddRing` adds a ring through the `addRing` method of
`QgsVectorLayerEditUtils` called by this of `QgsVectorLayer`.

The bug described in qgis#23113 indicates that only one of the entities receives the
ring addition when using the map tool.

This is consistent with the documentation of the `addRing` methods.
So, it is by design that the tool works like this.

However, as stated in the ticket, it is best to add the ring to all entities.

In order to avoid an api break, I added a new addMultiRing method that adds the ring on all entities.

Fixes qgis#23113
lbartoletti added a commit to lbartoletti/QGIS that referenced this issue Oct 17, 2022
The `QgsMapToolAddRing` adds a ring through the `addRing` method of
`QgsVectorLayerEditUtils` called by this of `QgsVectorLayer`.

The bug described in qgis#23113 indicates that only one of the entities receives the
ring addition when using the map tool.

This is consistent with the documentation of the `addRing` methods.
So, it is by design that the tool works like this.

However, as stated in the ticket, it is best to add the ring to all entities.

In order to avoid an api break, I added a new addMultiRing method that adds the ring on all entities.

Fixes qgis#23113
lbartoletti added a commit to lbartoletti/QGIS that referenced this issue Oct 18, 2022
The `QgsMapToolAddRing` adds a ring through the `addRing` method of
`QgsVectorLayerEditUtils` called by this of `QgsVectorLayer`.

The bug described in qgis#23113 indicates that only one of the entities receives the
ring addition when using the map tool.

This is consistent with the documentation of the `addRing` methods.
So, it is by design that the tool works like this.

However, as stated in the ticket, it is best to add the ring to all entities.

In order to avoid an api break, I added a new addMultiRing method that adds the ring on all entities.

Fixes qgis#23113
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
5 participants