Ignore:
Timestamp:
2017-11-21T23:54:18+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12636

Location:
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java

    r33085 r33858  
    1818import javax.swing.JToggleButton;
    1919
    20 import org.openstreetmap.josm.Main;
    2120import org.openstreetmap.josm.actions.JosmAction;
    2221import org.openstreetmap.josm.data.SelectionChangedListener;
     
    3433import org.openstreetmap.josm.data.osm.event.TagsChangedEvent;
    3534import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent;
     35import org.openstreetmap.josm.gui.MainApplication;
    3636import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
    3737import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
     
    147147        super(tr("Turn Lanes"), "turnlanes.png", tr("Edit turn lanes"), null, 200);
    148148
    149         Main.getLayerManager().addActiveLayerChangeListener(this);
     149        MainApplication.getLayerManager().addActiveLayerChangeListener(this);
    150150        DataSet.addSelectionListener(this);
    151151
     
    195195            oldLayer.data.removeDataSetListener(dataSetListener);
    196196        }
    197         OsmDataLayer newLayer = Main.getLayerManager().getEditLayer();
     197        OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer();
    198198        if (newLayer != null) {
    199199            newLayer.data.addDataSetListener(dataSetListener);
     
    215215    public void destroy() {
    216216        super.destroy();
    217         Main.getLayerManager().removeActiveLayerChangeListener(this);
     217        MainApplication.getLayerManager().removeActiveLayerChangeListener(this);
    218218        DataSet.removeSelectionListener(this);
    219219        editAction.destroy();
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/ValidationPanel.java

    r33085 r33858  
    1919import javax.swing.table.DefaultTableModel;
    2020
    21 import org.openstreetmap.josm.Main;
    2221import org.openstreetmap.josm.actions.JosmAction;
     22import org.openstreetmap.josm.gui.MainApplication;
    2323import org.openstreetmap.josm.gui.SideButton;
    2424import org.openstreetmap.josm.plugins.turnlanes.model.Issue;
     
    3838        @Override
    3939        public void actionPerformed(ActionEvent e) {
    40             setIssues(new Validator().validate(Main.getLayerManager().getEditDataSet()));
     40            setIssues(new Validator().validate(MainApplication.getLayerManager().getEditDataSet()));
    4141        }
    4242    };
     
    6363        public void actionPerformed(ActionEvent e) {
    6464            if (selected.getRelation() == null) {
    65                 Main.getLayerManager().getEditDataSet().setSelected(selected.getPrimitives());
     65                MainApplication.getLayerManager().getEditDataSet().setSelected(selected.getPrimitives());
    6666            } else {
    67                 Main.getLayerManager().getEditDataSet().setSelected(selected.getRelation());
     67                MainApplication.getLayerManager().getEditDataSet().setSelected(selected.getRelation());
    6868            }
    6969        }
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/GenericCommand.java

    r33085 r33858  
    3333    }
    3434
    35     private final DataSet dataSet;
    3635    private final String description;
    3736    private final Map<OsmPrimitive, BeforeAfter> beforeAfters = new HashMap<>();
    3837
    3938    public GenericCommand(DataSet dataSet, String description) {
    40         this.dataSet = dataSet;
     39        super(dataSet);
    4140        this.description = description;
    4241    }
     
    7170        for (Entry<OsmPrimitive, BeforeAfter> e : beforeAfters.entrySet()) {
    7271            if (e.getValue().before == null) {
    73                 dataSet.addPrimitive(e.getValue().afterPrimitive());
     72                getAffectedDataSet().addPrimitive(e.getValue().afterPrimitive());
    7473            } else {
    7574                e.getKey().load(e.getValue().afterData());
     
    8382        for (Entry<OsmPrimitive, BeforeAfter> e : beforeAfters.entrySet()) {
    8483            if (e.getValue().before == null) {
    85                 dataSet.removePrimitive(e.getValue().afterPrimitive().getPrimitiveId());
     84                getAffectedDataSet().removePrimitive(e.getValue().afterPrimitive().getPrimitiveId());
    8685            } else {
    8786                e.getKey().load(e.getValue().before);
Note: See TracChangeset for help on using the changeset viewer.