Changeset 29930 in osm for applications/editors/josm/plugins/namemanager
- Timestamp:
- 2013-09-18T21:26:49+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/namemanager
- Files:
-
- 2 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/namemanager/.classpath
r25571 r29930 3 3 <classpathentry kind="src" path="src"/> 4 4 <classpathentry kind="src" path="resources"/> 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER "/>5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> 6 6 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 7 7 <classpathentry kind="output" path="bin"/> -
applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java
r29778 r29930 70 70 @Override 71 71 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 72 setEnabled(newSelection != null 73 && Main.main.getCurrentDataSet().getSelectedWays().size() == 1 74 && Main.main.getCurrentDataSet().getSelectedWays().iterator().next().firstNode() == Main.main.getCurrentDataSet() 75 .getSelectedWays().iterator().next().lastNode()); 72 boolean enabledState = false; 73 DataSet ds = Main.main.getCurrentDataSet(); 74 if (newSelection != null && ds != null) { 75 Collection<Way> selectedWays = ds.getSelectedWays(); 76 enabledState = selectedWays.size() == 1 && selectedWays.iterator().next().isClosed(); 77 } 78 setEnabled(enabledState); 76 79 } 77 80 }
Note:
See TracChangeset
for help on using the changeset viewer.