Changeset 29672 in osm for applications/editors/josm/plugins/utilsplugin2/src
- Timestamp:
- 2013-06-20T02:28:28+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java
r28028 r29672 83 83 tags.putAll(currentTags); 84 84 } 85 rememberSelectionTags(); 85 if( getCurrentDataSet() != null) 86 rememberSelectionTags(); 86 87 87 88 setEnabled(selection != null && !selection.isEmpty() && !tags.isEmpty()); … … 89 90 90 91 private void rememberSelectionTags() { 91 if( getCurrentDataSet() != null && !getCurrentDataSet().getSelected().isEmpty() ) { 92 // Fix #8350 - only care about tagged objects 93 Collection<OsmPrimitive> selectedTaggedObjects = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected()); 94 for (Iterator<OsmPrimitive> it = selectedTaggedObjects.iterator(); it.hasNext(); ) { 95 if (!it.next().isTagged()) { 96 it.remove(); 97 } 98 } 99 if( !selectedTaggedObjects.isEmpty() ) { 92 100 currentTags.clear(); 93 101 Set<String> bad = new HashSet<String>(); 94 for( OsmPrimitive p : getCurrentDataSet().getSelected()) {102 for( OsmPrimitive p : selectedTaggedObjects ) { 95 103 if( currentTags.isEmpty() ) { 96 104 for( String key : p.keySet() )
Note:
See TracChangeset
for help on using the changeset viewer.