Ticket #18798: 18798.patch

File 18798.patch, 1.4 KB (added by taylor.smock, 5 weeks ago)

Initial patch (fixes the issue, no non-regression tests)

  • src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

     
    7070import org.openstreetmap.josm.command.Command;
    7171import org.openstreetmap.josm.command.SequenceCommand;
    7272import org.openstreetmap.josm.data.UndoRedoHandler;
     73import org.openstreetmap.josm.data.coor.LatLon;
    7374import org.openstreetmap.josm.data.osm.DataSet;
     75import org.openstreetmap.josm.data.osm.INode;
    7476import org.openstreetmap.josm.data.osm.OsmDataManager;
    7577import org.openstreetmap.josm.data.osm.OsmPrimitive;
    7678import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    692694            final Iterator<OsmPrimitive> osmPrimitiveIterator = sel.iterator();
    693695            final OsmPrimitive virtual = (osmPrimitiveIterator.hasNext() ? osmPrimitiveIterator.next().getType() : OsmPrimitiveType.NODE)
    694696                    .newInstance(0, false);
     697            if (virtual instanceof INode)
     698                ((INode) virtual).setCoor(LatLon.ZERO);
    695699            virtual.put(key, value);
    696700            final ImageIcon padded = ImageProvider.getPadded(virtual, ImageProvider.ImageSizes.LARGEICON.getImageDimension(),
    697701                    EnumSet.of(ImageProvider.GetPaddedOptions.NO_DEFAULT, ImageProvider.GetPaddedOptions.NO_DEPRECATED));