[PATCH] Disable the JosmAction Orthogonalize.Undo when nothing is selected
|Reported by:||floscher||Owned by:||team|
Currently (version 11088) a
NullPointerException occurs, when you have no
OsmDataLayer open and press
The reason for that is, that the
Orthogonalize.Undo is always active, but its
actionPerformed(e) method assumes, there is always an edit layer. If there is none, it throws a NullPointerException.
This patch fixes this behaviour by letting this action implement the methods
updateEnabledState(Collection<? extends OsmPrimitive> selection). So now the action is only active, when an edit layer exists and at minimum one
OsmPrimitive is selected.