Changeset 33858 in osm for applications
- Timestamp:
- 2017-11-21T23:54:18+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/turnlanes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnlanes/build.xml
r32680 r33858 5 5 <property name="commit.message" value="fix toolbar warnings - toolbar still does not work"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 0580"/>7 <property name="plugin.main.version" value="12636"/> 8 8 9 9 <!-- -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java
r33085 r33858 18 18 import javax.swing.JToggleButton; 19 19 20 import org.openstreetmap.josm.Main;21 20 import org.openstreetmap.josm.actions.JosmAction; 22 21 import org.openstreetmap.josm.data.SelectionChangedListener; … … 34 33 import org.openstreetmap.josm.data.osm.event.TagsChangedEvent; 35 34 import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent; 35 import org.openstreetmap.josm.gui.MainApplication; 36 36 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 37 37 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; … … 147 147 super(tr("Turn Lanes"), "turnlanes.png", tr("Edit turn lanes"), null, 200); 148 148 149 Main .getLayerManager().addActiveLayerChangeListener(this);149 MainApplication.getLayerManager().addActiveLayerChangeListener(this); 150 150 DataSet.addSelectionListener(this); 151 151 … … 195 195 oldLayer.data.removeDataSetListener(dataSetListener); 196 196 } 197 OsmDataLayer newLayer = Main .getLayerManager().getEditLayer();197 OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer(); 198 198 if (newLayer != null) { 199 199 newLayer.data.addDataSetListener(dataSetListener); … … 215 215 public void destroy() { 216 216 super.destroy(); 217 Main .getLayerManager().removeActiveLayerChangeListener(this);217 MainApplication.getLayerManager().removeActiveLayerChangeListener(this); 218 218 DataSet.removeSelectionListener(this); 219 219 editAction.destroy(); -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/ValidationPanel.java
r33085 r33858 19 19 import javax.swing.table.DefaultTableModel; 20 20 21 import org.openstreetmap.josm.Main;22 21 import org.openstreetmap.josm.actions.JosmAction; 22 import org.openstreetmap.josm.gui.MainApplication; 23 23 import org.openstreetmap.josm.gui.SideButton; 24 24 import org.openstreetmap.josm.plugins.turnlanes.model.Issue; … … 38 38 @Override 39 39 public void actionPerformed(ActionEvent e) { 40 setIssues(new Validator().validate(Main .getLayerManager().getEditDataSet()));40 setIssues(new Validator().validate(MainApplication.getLayerManager().getEditDataSet())); 41 41 } 42 42 }; … … 63 63 public void actionPerformed(ActionEvent e) { 64 64 if (selected.getRelation() == null) { 65 Main .getLayerManager().getEditDataSet().setSelected(selected.getPrimitives());65 MainApplication.getLayerManager().getEditDataSet().setSelected(selected.getPrimitives()); 66 66 } else { 67 Main .getLayerManager().getEditDataSet().setSelected(selected.getRelation());67 MainApplication.getLayerManager().getEditDataSet().setSelected(selected.getRelation()); 68 68 } 69 69 } -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/GenericCommand.java
r33085 r33858 33 33 } 34 34 35 private final DataSet dataSet;36 35 private final String description; 37 36 private final Map<OsmPrimitive, BeforeAfter> beforeAfters = new HashMap<>(); 38 37 39 38 public GenericCommand(DataSet dataSet, String description) { 40 this.dataSet = dataSet;39 super(dataSet); 41 40 this.description = description; 42 41 } … … 71 70 for (Entry<OsmPrimitive, BeforeAfter> e : beforeAfters.entrySet()) { 72 71 if (e.getValue().before == null) { 73 dataSet.addPrimitive(e.getValue().afterPrimitive());72 getAffectedDataSet().addPrimitive(e.getValue().afterPrimitive()); 74 73 } else { 75 74 e.getKey().load(e.getValue().afterData()); … … 83 82 for (Entry<OsmPrimitive, BeforeAfter> e : beforeAfters.entrySet()) { 84 83 if (e.getValue().before == null) { 85 dataSet.removePrimitive(e.getValue().afterPrimitive().getPrimitiveId());84 getAffectedDataSet().removePrimitive(e.getValue().afterPrimitive().getPrimitiveId()); 86 85 } else { 87 86 e.getKey().load(e.getValue().before);
Note:
See TracChangeset
for help on using the changeset viewer.