Ignore:
Timestamp:
2011-08-06T08:05:16+02:00 (13 years ago)
Author:
akks
Message:

'FastDraw: fix NPE and relation bugs after editing'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r26457 r26460  
    554554                    List<OsmPrimitive> refs = nd.getReferrers();
    555555                    // does someone need this node? if no-delete it.
    556                     if (refs.isEmpty()) cmds.add(new DeleteCommand(nd));                                       
     556                    if (refs.isEmpty() && !nd.isDeleted() && nd.isUsable()) cmds.add(new DeleteCommand(nd));                                       
    557557                }
    558558            }
     
    663663        if (w.isClosed()) line.closeLine();
    664664        oldNodes = w.getNodes();
    665         cmds.add(new DeleteCommand(w));
     665        List <OsmPrimitive> wl = new ArrayList(); wl.add(w);
     666       
     667        Command c = DeleteCommand.delete(getEditLayer(), wl, false);
     668        if (c != null) cmds.add(c);
    666669        delCmd = new SequenceCommand(tr("Convert way to FastDraw line"), cmds);
    667670        Main.main.undoRedo.add(delCmd);
Note: See TracChangeset for help on using the changeset viewer.