- Timestamp:
- 2014-10-27T21:21:47+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r7120 r7657 201 201 OsmDataLayer layer = Main.main.getEditLayer(); 202 202 if (layer == null) return; 203 layer.data.setSelected(Collections.singleton(model.getElementAt(idx))); 203 OsmPrimitive osm = model.getElementAt(idx); 204 Collection<OsmPrimitive> sel = layer.data.getSelected(); 205 if (sel.size() != 1 || !sel.iterator().next().equals(osm)) { 206 // Select primitive if it's not the whole current selection 207 layer.data.setSelected(Collections.singleton(osm)); 208 } else if (osm instanceof Relation) { 209 // else open relation editor if applicable 210 actEditRelationSelection.actionPerformed(null); 211 } 204 212 } else if (highlightEnabled && Main.isDisplayingMapView()) { 205 213 if (helper.highlightOnly(model.getElementAt(idx))) {
Note:
See TracChangeset
for help on using the changeset viewer.