Changeset 14143 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2018-08-12T14:27:32+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java
r13852 r14143 219 219 * 220 220 * Note that changes are not applied to the data yet. You have to 221 * submit the command first, i.e. {@code Main.main.undoredo.add(result)}.221 * submit the command first, i.e. {@code UndoRedoHandler.getInstance().add(result)}. 222 222 * 223 223 * @param way the way to split. Must not be null. … … 237 237 * 238 238 * Note that changes are not applied to the data yet. You have to 239 * submit the command first, i.e. {@code Main.main.undoredo.add(result)}.239 * submit the command first, i.e. {@code UndoRedoHandler.getInstance().add(result)}. 240 240 * 241 241 * @param way the way to split. Must not be null. … … 464 464 * 465 465 * Note that changes are not applied to the data yet. You have to 466 * submit the command first, i.e. {@code Main.main.undoredo.add(result)}.466 * submit the command first, i.e. {@code UndoRedoHandler.getInstance().add(result)}. 467 467 * 468 468 * Replies null if the way couldn't be split at the given nodes. -
trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java
r13173 r14143 15 15 import org.openstreetmap.josm.data.osm.DataSet; 16 16 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 17 import org.openstreetmap.josm.data.osm.OsmDataManager; 17 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 19 import org.openstreetmap.josm.tools.ImageProvider; … … 66 67 public void undoCommand() { 67 68 DataSet ds = getAffectedDataSet(); 68 if ( Main.main != null && !Main.main.containsDataSet(ds)) {69 if (!OsmDataManager.getInstance().containsDataSet(ds)) { 69 70 Logging.warn(tr("Layer ''{0}'' does not exist any more. Cannot remove conflict for object ''{1}''.", 70 71 ds.getName(), -
trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java
r13434 r14143 6 6 import java.util.Objects; 7 7 8 import org.openstreetmap.josm.Main;9 8 import org.openstreetmap.josm.command.Command; 10 9 import org.openstreetmap.josm.data.conflict.Conflict; 11 10 import org.openstreetmap.josm.data.conflict.ConflictCollection; 12 11 import org.openstreetmap.josm.data.osm.DataSet; 12 import org.openstreetmap.josm.data.osm.OsmDataManager; 13 13 import org.openstreetmap.josm.tools.Logging; 14 14 … … 63 63 64 64 DataSet ds = getAffectedDataSet(); 65 if (Main.main != null) { 66 if (!Main.main.containsDataSet(ds)) { 67 Logging.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more", 68 this.toString(), 69 ds.getName() 70 )); 71 return; 72 } 65 if (!OsmDataManager.getInstance().containsDataSet(ds)) { 66 Logging.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more", 67 this.toString(), 68 ds.getName() 69 )); 70 return; 71 } 73 72 74 Main.main.setActiveDataSet(ds); 75 } 73 OsmDataManager.getInstance().setActiveDataSet(ds); 76 74 reconstituteConflicts(); 77 75 } -
trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java
r13434 r14143 10 10 import javax.swing.Icon; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.data.conflict.Conflict; 14 13 import org.openstreetmap.josm.data.osm.DataSet; 14 import org.openstreetmap.josm.data.osm.OsmDataManager; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 16 import org.openstreetmap.josm.data.osm.Relation; … … 73 73 public void undoCommand() { 74 74 DataSet ds = getAffectedDataSet(); 75 if (! Main.main.containsDataSet(ds)) {75 if (!OsmDataManager.getInstance().containsDataSet(ds)) { 76 76 Logging.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more", 77 77 this.toString(), … … 81 81 } 82 82 83 Main.main.setActiveDataSet(ds);83 OsmDataManager.getInstance().setActiveDataSet(ds); 84 84 85 85 // restore the former state
Note:
See TracChangeset
for help on using the changeset viewer.