Changeset 5790 in josm
- Timestamp:
- 2013-03-21T14:41:44+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r5741 r5790 47 47 } 48 48 } 49 } 50 51 public static void executeByMainWorkerInEDT(final Runnable task) { 52 Main.worker.submit(new Runnable() { 53 public void run() { 54 runInEDTAndWait(task); 55 } 56 }); 49 57 } 50 58 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r5784 r5790 80 80 count[i] = 0; 81 81 String key = tags[i][0]; 82 String value = tags[i][1]; 82 83 Boolean b = Boolean.TRUE; 83 84 for (OsmPrimitive osm : sel) { 84 if (osm.keySet().contains(key) ) {85 if (osm.keySet().contains(key) && !osm.get(key).equals(value)) { 85 86 b = Boolean.FALSE; 86 87 count[i]++; … … 141 142 for (int i=0; i<tm.getRowCount(); i++) { 142 143 String key = (String)tm.getValueAt(i, 1); 144 String value = (String)tm.getValueAt(i, 1); 143 145 count[i] = 0; 144 146 for (OsmPrimitive osm : sel) { 145 if (osm.keySet().contains(key) ) {147 if (osm.keySet().contains(key) && !osm.get(key).equals(value)) { 146 148 count[i]++; 147 149 break; … … 158 160 @Override 159 161 protected void buttonAction(int buttonIndex, ActionEvent evt) { 160 if (buttonIndex != 2) { 162 // if layer all layers were closed, ignore all actions 163 if (Main.main.getCurrentDataSet() != null && buttonIndex != 2) { 161 164 TableModel tm = propertyTable.getModel(); 162 165 for (int i=0; i<tm.getRowCount(); i++) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r5707 r5790 27 27 import org.openstreetmap.josm.data.osm.Way; 28 28 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 29 import org.openstreetmap.josm.gui.util.GuiHelper; 29 30 import org.openstreetmap.josm.io.remotecontrol.AddTagsDialog; 30 31 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault; … … 132 133 */ 133 134 if (args.containsKey("addtags")) { 134 Main.worker.execute(new Runnable() {135 GuiHelper.executeByMainWorkerInEDT(new Runnable() { 135 136 public void run() { 136 137 DataSet ds = Main.main.getCurrentDataSet(); … … 145 146 if (args.containsKey("select") && PermissionPrefWithDefault.CHANGE_SELECTION.isAllowed()) { 146 147 // select objects after downloading, zoom to selection. 147 Main.worker.execute(new Runnable() {148 GuiHelper.executeByMainWorkerInEDT(new Runnable() { 148 149 public void run() { 149 150 HashSet<OsmPrimitive> newSel = new HashSet<OsmPrimitive>(); … … 199 200 static void addTags(final Map<String, String> args) { 200 201 if (args.containsKey("addtags")) { 201 Main.worker.execute(new Runnable() {202 GuiHelper.executeByMainWorkerInEDT(new Runnable() { 202 203 203 204 public void run() { … … 235 236 // make sure this isn't called unless there *is* a MapView 236 237 if (Main.isDisplayingMapView()) { 237 Main.worker.execute(new Runnable() {238 GuiHelper.executeByMainWorkerInEDT(new Runnable() { 238 239 public void run() { 239 240 BoundingXYVisitor bbox = new BoundingXYVisitor();
Note:
See TracChangeset
for help on using the changeset viewer.