Changeset 10446 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol
- Timestamp:
- 2016-06-21T00:58:45+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io/remotecontrol
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r10378 r10446 242 242 protected void buttonAction(int buttonIndex, ActionEvent evt) { 243 243 // if layer all layers were closed, ignore all actions 244 if (Main. main.getCurrentDataSet() != null && buttonIndex != 2) {244 if (Main.getLayerManager().getEditDataSet() != null && buttonIndex != 2) { 245 245 TableModel tm = propertyTable.getModel(); 246 246 for (int i = 0; i < tm.getRowCount(); i++) { … … 304 304 public static void addTags(String[][] keyValue, String sender, Collection<? extends OsmPrimitive> primitives) { 305 305 if (trustedSenders.contains(sender)) { 306 if (Main. main.getCurrentDataSet() != null) {306 if (Main.getLayerManager().getEditDataSet() != null) { 307 307 for (String[] row : keyValue) { 308 308 Main.main.undoRedo.add(new ChangePropertyCommand(primitives, row[0], row[1])); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r9732 r10446 102 102 } 103 103 104 Main. main.getCurrentDataSet().setSelected(node);104 Main.getLayerManager().getEditDataSet().setSelected(node); 105 105 if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) { 106 106 AutoScaleAction.autoScale("selection"); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r10116 r10446 171 171 commands.add(new AddCommand(way)); 172 172 Main.main.undoRedo.add(new SequenceCommand(tr("Add way"), commands)); 173 Main. main.getCurrentDataSet().setSelected(way);173 Main.getLayerManager().getEditDataSet().setSelected(way); 174 174 if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) { 175 175 AutoScaleAction.autoScale("selection"); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r10212 r10446 119 119 // find out whether some data has already been downloaded 120 120 Area present = null; 121 DataSet ds = Main. main.getCurrentDataSet();121 DataSet ds = Main.getLayerManager().getEditDataSet(); 122 122 if (ds != null) { 123 123 present = ds.getDataSourceArea(); … … 158 158 @Override 159 159 public void run() { 160 DataSet ds = Main. main.getCurrentDataSet();160 DataSet ds = Main.getLayerManager().getEditDataSet(); 161 161 if (ds == null) // e.g. download failed 162 162 return; … … 174 174 public void run() { 175 175 Set<OsmPrimitive> newSel = new HashSet<>(); 176 DataSet ds = Main. main.getCurrentDataSet();176 DataSet ds = Main.getLayerManager().getEditDataSet(); 177 177 if (ds == null) // e.g. download failed 178 178 return; … … 200 200 @Override 201 201 public void run() { 202 final DataSet ds = Main. main.getCurrentDataSet();202 final DataSet ds = Main.getLayerManager().getEditDataSet(); 203 203 final Collection<OsmPrimitive> filteredPrimitives = Utils.filter(ds.allPrimitives(), search); 204 204 ds.setSelected(filteredPrimitives); … … 221 221 @Override 222 222 public void run() { 223 if (Main. main.getCurrentDataSet() != null) {223 if (Main.getLayerManager().getEditDataSet() != null) { 224 224 if (args.containsKey("changeset_comment")) { 225 Main. main.getCurrentDataSet().addChangeSetTag("comment", args.get("changeset_comment"));225 Main.getLayerManager().getEditDataSet().addChangeSetTag("comment", args.get("changeset_comment")); 226 226 } 227 227 if (args.containsKey("changeset_source")) { 228 Main. main.getCurrentDataSet().addChangeSetTag("source", args.get("changeset_source"));228 Main.getLayerManager().getEditDataSet().addChangeSetTag("source", args.get("changeset_source")); 229 229 } 230 230 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
r10116 r10446 72 72 public void run() { 73 73 final List<PrimitiveId> downloaded = task.getDownloadedId(); 74 final DataSet ds = Main. main.getCurrentDataSet();74 final DataSet ds = Main.getLayerManager().getEditDataSet(); 75 75 if (downloaded != null) { 76 76 GuiHelper.runInEDT(new Runnable() {
Note:
See TracChangeset
for help on using the changeset viewer.