Modify

Opened 14 years ago

Closed 14 years ago

#3838 closed defect (fixed)

DrawAction: Wrong start point for helper line after adding node with double click

Reported by: Habakuk Tibatong Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc: xeen

Description

When I add a single node with a double-click it is selected after that. When I add a second node both are selected, but when I add a third node only that one is selected, another new node and the third and fourth are selected, the fifth node again is the only selected ...

Does it have a reason or is it a bug?

Attachments (0)

Change History (7)

comment:1 by stoecker, 14 years ago

Cc: xeen added

It's a defect. Double clicking behaves strange drawing nodes at strange positions as well as drawing lines sometimes or not and drawing single nodes after lines have been displayed. Someone broke the drawing code I would think.

comment:2 by stoecker, 14 years ago

Priority: normalmajor

comment:3 by Landwirt, 14 years ago

Priority: majorcritical

Though there is mostly minor damage this bug can mess up nodes when the user doesn't recognize that two nodes are selected. Problematic, for example, when editing house numbers: copy node with address infos, insert node (Ctrl+V) and edit house number - you'll see that original and new node are changed. I've no evidence but I believe that not all users notice their mistake and upload.

comment:4 by Gubaer, 14 years ago

(In [2528]) see #3838: Selection behaves weird when adding nodes with double-click

comment:5 by Gubaer, 14 years ago

Priority: criticalnormal
Summary: Selection behaves weird when adding nodes with double-clickDrawAction: Wrong start point for helper line after adding node with double click

r2528 is a quick fix for the specific issue described in this defect. The code in DrawAction should be brushed up, though. It still behaves weird in some situation, for instance

  • add a node with double click -> node n1 is added
  • single click somewhere (but not on a way) -> node n2 added
  • observed: JOSM paints a helper line from n1; expected: JOSM should paint a helper line starting from n2

Leaving this ticket open, but lowering its criticality.

comment:6 by MikeN, 14 years ago

Priority: normalmajor

r2528 seems to have introduced a new problem:
To reproduce, open any area and begin editing.

-Begin drawing a Way
-Move mouse to 2nd node. Take care not to move the mouse during:

Click to add 2nd node to way
Double click on same node without moving mouse results in exception below


Build-Date: 2009-11-28 15:29:41
Revision: 2538
Is-Local-Build: true

Memory Usage: 80 MB / 682 MB (49 MB allocated, but free)
Java version: 1.6.0_17

Dataset consistency test:
No problems found

Plugins: AddrInterpolation
AgPifoJ
DirectUpload
remotecontrol
validator
wmsplugin
Plugin AddrInterpolation Version: 18503
Plugin AgPifoJ Version: 18593
Plugin DirectUpload Version: 17532
Plugin remotecontrol Version: 18678
Plugin validator Version: 18813
Plugin wmsplugin Version: 18762

java.lang.NullPointerException

at org.openstreetmap.josm.data.osm.DataSet$IdHash.getHashCode(DataSet.java:37)
at org.openstreetmap.josm.data.osm.DataSet$IdHash.getHashCode(DataSet.java:34)
at org.openstreetmap.josm.data.osm.Storage.getBucket(Storage.java:219)
at org.openstreetmap.josm.data.osm.Storage.access$100(Storage.java:88)
at org.openstreetmap.josm.data.osm.Storage$FMap.get(Storage.java:332)
at org.openstreetmap.josm.data.osm.DataSet.getPrimitiveById(DataSet.java:601)
at org.openstreetmap.josm.data.osm.DataSet.getPrimitiveById(DataSet.java:597)
at org.openstreetmap.josm.data.osm.DataSet.getPrimitiveByIdChecked(DataSet.java:621)
at org.openstreetmap.josm.data.osm.DataSet.addSelected(DataSet.java:413)
at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:364)
at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:377)
at org.openstreetmap.josm.actions.mapmode.DrawAction.mouseClicked(DrawAction.java:315)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

comment:7 by bastiK, 14 years ago

Resolution: fixed
Status: newclosed

(In [2558]) fix #3838 - DrawAction: Wrong start point for helper line after adding node with double click

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.