Bug report #7628

undo while digitizing show wrong geometry of rubberband

Added by Richard Duivenvoorde almost 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16551

Description

While you are digitizing/editing a line or polygon, it is possible to undo the last click in your line or polygon by using the DELETE or BACKSPACE key.

At this moment you see the red temporary object (which is a rubberband item) change, but counter intuitive. As soon as you move the mouse it is ok, but that is because the rubberband is repainted the right way then.

Try out:

Create a polygon with 4 vertices, and put your mouse somewhere in the middle of the square.
Now hit DELETE or BACKSPACE. You will see your square.
Now hit right mouse to stop editing. While the ending polygon is ok, the temporary geometry was wrong.

The problem is that in the qgsrubberband.removeLastPoint method actually removes the last point, which is actually not what you want if you are undoing a rubberband edit. I think you want to remove the point before the last one. In that case the rubberband stays intact and is more intuitive.

I'll attach a patch + pull request to show

Associated revisions

Revision bfef00a6
Added by Matthias Kuhn almost 11 years ago

Merge pull request #544 from rduivenvoorde/rubberband#7628

fix #7628

Also available in: Atom PDF