Bug report #13661
Node tool should not allow to delete nodes and leave just 1 in lines or two in polygons
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Digitising | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21696 |
Description
When I am editing a Feature in a Line-Shapefile I can delete all but one nodes of a Line leading to a Line Feature with just one single Point.
I think, when Editing Lines with the Node Tool it should not be possible to delete the 2. Last Node of a Line.
It is BTW the same Situation editing Polygons. By deleting all but 2 nodes I can create a polygon with 2 to points...
Peter
Related issues
History
#1 Updated by Saber Razmjooei about 9 years ago
- Category changed from Vectors to Digitising
#2 Updated by Giovanni Manghi about 9 years ago
- Subject changed from Shapefile Editing to Node tool should not allow to delete nodes and leave just 1 in lines or two in polygons
- Operating System deleted (
Windows 7) - OS version deleted (
64 bit)
by the way, with polygons is possible to save one with just two nodes (after deleting the others with the node tool), creating polygon with area = 0.
#3 Updated by Jürgen Fischer about 9 years ago
Duplicate of #13099?
#4 Updated by Nyall Dawson about 9 years ago
I think the correct behaviour should still be to allow <3 nodes in polygons and 1 nodes for lines as a temporary step (see #13099 for reasoning), but then catch these invalid geometries when node tool operation is finalised for the feature.
#5 Updated by Giovanni Manghi about 9 years ago
Nyall Dawson wrote:
I think the correct behaviour should still be to allow <3 nodes in polygons and 1 nodes for lines as a temporary step (see #13099 for reasoning), but then catch these invalid geometries when node tool operation is finalised for the feature.
Hi Nyall, I see your point, but anyway as it is right now in master is a bit confusing. Take the polygon example: the user deletes all but two nodes, as soon as the focus of the node tool switches to another polygon, the two noded one disappear... but after saving edits it re-appear (as a "line"). Cheers!
#6 Updated by Jürgen Fischer about 9 years ago
Giovanni Manghi wrote:
Hi Nyall, I see your point, but anyway as it is right now in master is a bit confusing. Take the polygon example: the user deletes all but two nodes, as soon as the focus of the node tool switches to another polygon, the two noded one disappear... but after saving edits it re-appear (as a "line"). Cheers!
Right, earlier removing the last point that would make a ring or line invalid (in terms of number of points) in the node tool would also remove the other remaining points.
#7 Updated by Nyall Dawson about 9 years ago
Jürgen Fischer wrote:
Giovanni Manghi wrote:
Hi Nyall, I see your point, but anyway as it is right now in master is a bit confusing. Take the polygon example: the user deletes all but two nodes, as soon as the focus of the node tool switches to another polygon, the two noded one disappear... but after saving edits it re-appear (as a "line"). Cheers!
Right, earlier removing the last point that would make a ring or line invalid (in terms of number of points) in the node tool would also remove the other remaining points.
Ah ok - that makes a lot more sense.
#8 Updated by Saber Razmjooei about 9 years ago
We also had a similiar discussion here #13674.
#9 Updated by Marco Hugentobler almost 9 years ago
https://github.com/qgis/QGIS/pull/2632 provides a fix.
#10 Updated by Giovanni Manghi almost 9 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed