Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r8470 r8510 263 263 public static boolean pasteTagsFromText(Collection<OsmPrimitive> selection, String text) { 264 264 Map<String, String> tags = TextTagParser.readTagsFromText(text); 265 if (tags ==null || tags.isEmpty()) {265 if (tags == null || tags.isEmpty()) { 266 266 TextTagParser.showBadBufferMessage(help); 267 267 return false; … … 272 272 for (Entry<String, String> entry: tags.entrySet()) { 273 273 String v = entry.getValue(); 274 commands.add(new ChangePropertyCommand(selection, entry.getKey(), "".equals(v) ?null:v));274 commands.add(new ChangePropertyCommand(selection, entry.getKey(), "".equals(v) ? null : v)); 275 275 } 276 276 commitCommands(selection, commands); … … 284 284 public static boolean pasteTagsFromJOSMBuffer(Collection<OsmPrimitive> selection) { 285 285 List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded(); 286 if (directlyAdded ==null || directlyAdded.isEmpty()) return false;286 if (directlyAdded == null || directlyAdded.isEmpty()) return false; 287 287 288 288 PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, selection); … … 323 323 @Override 324 324 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 325 setEnabled(selection != null && !selection.isEmpty());325 setEnabled(selection != null && !selection.isEmpty()); 326 326 } 327 327 }
Note:
See TracChangeset
for help on using the changeset viewer.