Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r8509 r8510 114 114 115 115 public String getLocaleName() { 116 if (locale_name == null) {117 if (name_context != null) {116 if (locale_name == null) { 117 if (name_context != null) { 118 118 locale_name = trc(name_context, TaggingPresetItems.fixPresetString(name)); 119 119 } else { … … 208 208 private static class PresetPanel extends JPanel { 209 209 private boolean hasElements = false; 210 210 211 PresetPanel() { 211 212 super(new GridBagLayout()); … … 219 220 List<Link> l = new LinkedList<>(); 220 221 List<PresetLink> presetLink = new LinkedList<>(); 221 if (types != null) {222 if (types != null) { 222 223 JPanel pp = new JPanel(); 223 224 for (TaggingPresetType t : types) { … … 267 268 JToggleButton tb = new JToggleButton(new ToolbarButtonAction()); 268 269 tb.setFocusable(false); 269 p.add(tb, GBC.std(0, 0).anchor(GBC.LINE_END));270 p.add(tb, GBC.std(0, 0).anchor(GBC.LINE_END)); 270 271 return p; 271 272 } … … 318 319 final Relation r = new Relation(); 319 320 final Collection<RelationMember> members = new HashSet<>(); 320 for (Tag t : getChangedTags()) {321 for (Tag t : getChangedTags()) { 321 322 r.put(t.getKey(), t.getValue()); 322 323 } … … 340 341 public PresetDialog(Component content, String title, ImageIcon icon, boolean disableApply, boolean showNewRelation) { 341 342 super(Main.parent, title, 342 showNewRelation ?343 showNewRelation ? 343 344 new String[] {tr("Apply Preset"), tr("New relation"), tr("Cancel")} : 344 345 new String[] {tr("Apply Preset"), tr("Cancel")}, … … 346 347 if (icon != null) 347 348 setIconImage(icon.getImage()); 348 contentInsets = new Insets(10, 5,0,5);349 contentInsets = new Insets(10, 5, 0, 5); 349 350 if (showNewRelation) { 350 351 setButtonIcons(new String[] {"ok", "dialogs/addrelation", "cancel" }); … … 375 376 if (p.getComponentCount() != 0 && (sel.isEmpty() || p.hasElements)) { 376 377 String title = trn("Change {0} object", "Change {0} objects", sel.size(), sel.size()); 377 if (sel.isEmpty()) {378 if (originalSelectionEmpty) {378 if (sel.isEmpty()) { 379 if (originalSelectionEmpty) { 379 380 title = tr("Nothing selected!"); 380 381 } else { … … 460 461 @Override 461 462 public String toString() { 462 return (types == null ?"":types) + " " + name;463 return (types == null ? "" : types) + " " + name; 463 464 } 464 465
Note:
See TracChangeset
for help on using the changeset viewer.