Ticket #1122 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

ModifyFeature left over points after point deletion

Reported by: pvalsecc Owned by: tschaub
Priority: minor Milestone: 2.6 Release
Component: Control.ModifyFeature Version: SVN
Keywords: Cc:
State:

Description

To reproduce (for example with examples/modify-feature.html):

  • Create a polygon
  • Use ModifyFeature to edit it
  • Select the polygon to put it in edition mode.
  • Click on an existing point handle (little circle) and drag it
  • While the mouse button is pressed, press the DEL key
  • Keep the mouse button down and move the mouse
  • Release the mouse button

The point will be deleted from the polygon (good!), but the handle (little circle) of the deleted point will stay on your layer forever.

Another very minor bug on the same subject:

  • Same as before up to the point where you select the polygon to put it in edition mode.
  • Click on a point handle in the middle of a segment (to create a new point) and drag it.
  • Keep the mouse button pressed and try to press the DEL key.

The point is not deleted. You have to release the mouse button and re-click on it to be able to delete it.

Attachments

delete-while-dragging.patch Download (1.4 KB) - added by tschaub 6 years ago.
don't allow point deletion while dragging

Change History

Changed 6 years ago by tschaub

Ok, the second part I'm not going to deal with. You can't delete virtual vertices. So, you have to wait until they become real vertices before deleting them.

Now that you bring this up, I do notice another interesting bug. When I am dragging around a vertex, if I reach forward and click the delete key with my elbow before I release the mouse button, sometimes my head hits the screen and leaves a little grease smudge on the monitor.

Changed 6 years ago by tschaub

don't allow point deletion while dragging

Changed 6 years ago by tschaub

  • keywords review added
  • milestone set to 2.6 Release

Ok, this patch resolves the problems I see. Tests pass. Please review.

Changed 6 years ago by crschmidt

  • keywords commit added; review removed

Looks good. Please commit.

Changed 6 years ago by tschaub

  • keywords commit removed
  • status changed from new to closed
  • resolution set to fixed

(In [5099]) Dissalow vertex deletion while dragging - thanks for the review crschmidt (closes #1122).

Changed 6 years ago by pvalsecc

Very funny remark about the second bug. I love that... but when you develop a GUI, you should always expect a user to behave like a crazy monkeys (which I am).

That's funny... I didn't know that it was possible to delete a point without dragging it. When I first wanted to delete a point, I tried to click on it to select it and press delete. Like you have to do in most softwares. Didn't work.

Then I tried to drag it and press delete, it worked. So I kept using the technique. Now I've tried other ways to do it and found that you have to leave the mouse pointer over the point and press delete.

That's quite unusual... it's actually the first soft I see where you have to do like that.

What do you think if I propose a patch? It would:

  • Highlight the last clicked point.
  • Delete the highlighted point when the DEL key is pressed.
Note: See TracTickets for help on using tickets.