Changeset 692 in josm for trunk/src/org
- Timestamp:
- 2008-07-09T11:34:43+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r679 r692 334 334 335 335 public String helpTopic() { 336 return tr("Statusline");336 return "Statusline"; 337 337 } 338 338 -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r680 r692 273 273 } 274 274 @Override public void addCommands(Collection<OsmPrimitive> sel, List<Command> cmds) { 275 Object display = combo.getSelectedItem();275 String display = combo.getSelectedItem().toString(); 276 276 String value = null; 277 if (display != null) 278 for (String key : lhm.keySet()) { 277 if(display == null && combo.isEditable()) 278 display = combo.getEditor().getItem().toString(); 279 280 if (display != null) 281 { 282 for (String key : lhm.keySet()) { 279 283 String k = lhm.get(key); 280 if (k != null && k.equals(display)) value=key; 284 if (k != null && k.equals(display)) value=key; 281 285 } 282 String str = combo.isEditable() ? combo.getEditor().getItem().toString() : value; 283 286 if(value == null) 287 value = display; 288 } 289 284 290 // no change if same as before 285 if ( str.equals(originalValue) || (originalValue == null && str.length() == 0)) return;286 287 if (delete_if_empty && str != null && str.length() == 0)288 str= null;289 cmds.add(new ChangePropertyCommand(sel, key, str));291 if (value.equals(originalValue) || (originalValue == null && (value == null || value.length() == 0))) return; 292 293 if (delete_if_empty && value != null && value.length() == 0) 294 value = null; 295 cmds.add(new ChangePropertyCommand(sel, key, value)); 290 296 } 291 297 @Override boolean requestFocusInWindow() {return combo.requestFocusInWindow();}
Note:
See TracChangeset
for help on using the changeset viewer.