Opened 16 years ago
Closed 16 years ago
#2140 closed defect (fixed)
[PATCH] JOSM error when moving way+nodes when it is part of relation with at least one node not downloaded
Reported by: | xeen | Owned by: | framm |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | unspecified | Version: | |
Keywords: | Cc: |
Description
The error appears under the following conditions:
- At least one node of the relation is not yet downloaded
- The way must be part of the relation
- You need to move the way /and/ its nodes
I attached a minimal test case. The error is as follows:
Path: trunk URL: http://josm.openstreetmap.de/svn/trunk Repository Root: http://josm.openstreetmap.de/svn Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Revision: 1365 Node Kind: directory Last Changed Author: ulfl Last Changed Rev: 1365 Last Changed Date: 2009-02-01 22:20:56 +0100 (Sun, 01 Feb 2009) Java version: 1.6.0_06 Plugins: AgPifoJ;Create_grid_of_ways;DirectUpload;nearclick;openstreetbugs;slippy_map_chooser;utilsplugin;validator;wmsplugin Plugin AgPifoJ Version: 13409 Plugin Create_grid_of_ways Version: 12782 Plugin DirectUpload Version: ${version.entry.commit.revision} Plugin nearclick Version: 13409 Plugin openstreetbugs Version: 13477 Plugin slippy_map_chooser Version: 13409 Plugin utilsplugin Version: ${version.entry.commit.revision} Plugin validator Version: 13409 Plugin wmsplugin Version: 13409 java.lang.NullPointerException at org.openstreetmap.josm.command.MoveCommand.executeCommand(MoveCommand.java:99) at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:38) at org.openstreetmap.josm.actions.mapmode.SelectAction.mouseDragged(SelectAction.java:203) at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source) at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source) at java.awt.Component.processMouseMotionEvent(Unknown Source) at javax.swing.JComponent.processMouseMotionEvent(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)
Attachments (2)
Change History (6)
by , 16 years ago
comment:1 by , 16 years ago
Investigated a bit and this always happen when trying to move a relation with non-download parts. So, CTRL+A is not required, just double click a relation in the relation dialog and select an additional node or way (so you have something to "grip on" when moving) and it will produce the same error.
We could simply ignore relations when trying to move them or warn that the whole relation must be downloaded in order to move it. Former approach is probably easier and I prefer it because I don't see the reason of being able to move a relation. It's not a common case and if this is really needed one can just double click the relation in the relations dialog and move all selected ways/nodes.
comment:2 by , 16 years ago
Relations cannot be moved (only their elements), so approach one is correct.
by , 16 years ago
Attachment: | FixRelationHandling.patch added |
---|
Easy fix – removes relations from selection when dealing with moving/rotating
comment:3 by , 16 years ago
Summary: | JOSM error when moving way+nodes when it is part of relation with at least one node not downloaded → [PATCH] JOSM error when moving way+nodes when it is part of relation with at least one node not downloaded |
---|
Minimal testcase showing the error