- Timestamp:
- 2019-09-26T17:14:19+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r15356 r15376 70 70 import org.openstreetmap.josm.data.osm.RelationMember; 71 71 import org.openstreetmap.josm.data.osm.Tag; 72 import org.openstreetmap.josm.data.osm.Tags; 72 73 import org.openstreetmap.josm.data.osm.Way; 73 74 import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent; … … 714 715 715 716 /** 716 * Returns the selected tag. 717 * Returns the selected tag. Value is empty if several tags are selected for a given key. 717 718 * @return The current selected tag 718 719 */ 719 720 public Tag getSelectedProperty() { 721 Tags tags = getSelectedProperties(); 722 return tags == null ? null : new Tag( 723 tags.getKey(), 724 tags.getValues().size() > 1 ? "" : tags.getValues().iterator().next()); 725 } 726 727 /** 728 * Returns the selected tags. Contains all values if several are selected for a given key. 729 * @return The current selected tags 730 * @since 15376 731 */ 732 public Tags getSelectedProperties() { 720 733 int row = tagTable.getSelectedRow(); 721 734 if (row == -1) return null; 722 735 Map<String, Integer> map = editHelper.getDataValues(row); 723 return new Tag( 724 editHelper.getDataKey(row), 725 map.size() > 1 ? "" : map.keySet().iterator().next()); 736 return new Tags(editHelper.getDataKey(row), map.keySet()); 726 737 } 727 738
Note:
See TracChangeset
for help on using the changeset viewer.