Ignore:
Timestamp:
2013-12-22T12:27:11+01:00 (11 years ago)
Author:
donvip
Message:

[josm-plugins] global replacement of Main.map.mapview.getEditLayer() by Main.main.getEditLayer() (avoids NPEs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/OsmToCmd.java

    r29505 r30145  
    250250                else if (currentPrimitive.isModified()) {
    251251                    //System.out.println(String.valueOf(currentPrimitive.getUniqueId()) + " IS MODIFIED BY SCRIPT");
    252                     cmds.add(new ChangeCommand(Main.map.mapView.getEditLayer(), targetDataSet.getPrimitiveById(currentPrimitive.getPrimitiveId()), currentPrimitive));
     252                    cmds.add(new ChangeCommand(Main.main.getEditLayer(), targetDataSet.getPrimitiveById(currentPrimitive.getPrimitiveId()), currentPrimitive));
    253253                }
    254254                else if (currentPrimitive.isNew()) {
     
    262262                }
    263263                else if (currentPrimitive.isModified()) {
    264                     cmds.add(new ChangeCommand(Main.map.mapView.getEditLayer(), targetDataSet.getPrimitiveById(currentPrimitive.getPrimitiveId()), currentPrimitive));
     264                    cmds.add(new ChangeCommand(Main.main.getEditLayer(), targetDataSet.getPrimitiveById(currentPrimitive.getPrimitiveId()), currentPrimitive));
    265265                }
    266266                else if (currentPrimitive.isNew()) {
     
    274274                }
    275275                else if (currentPrimitive.isModified()) {
    276                     cmds.add(new ChangeCommand(Main.map.mapView.getEditLayer(), targetDataSet.getPrimitiveById(currentPrimitive.getPrimitiveId()), currentPrimitive));
     276                    cmds.add(new ChangeCommand(Main.main.getEditLayer(), targetDataSet.getPrimitiveById(currentPrimitive.getPrimitiveId()), currentPrimitive));
    277277                }
    278278                else if (currentPrimitive.isNew()) {
Note: See TracChangeset for help on using the changeset viewer.