Changeset 680 in josm
- Timestamp:
- 2008-07-05T15:10:14+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/preferences/TaggingPresetPreference.java
r627 r680 129 129 HashMap<String,JMenu> submenus = new HashMap<String,JMenu>(); 130 130 for (final TaggingPreset p : taggingPresets) { 131 if (p.getValue(Action.NAME).equals(" ")) { 131 String name = (String) p.getValue(Action.NAME); 132 if (name.equals(" ")) { 132 133 Main.main.menu.presetsMenu.add(new JSeparator()); 133 134 } else { 134 String name = (String) p.getValue(Action.NAME);135 135 String[] sp = name.split("/"); 136 136 if (sp.length <= 1) { 137 137 Main.main.menu.presetsMenu.add(new JMenuItem(p)); 138 138 } else { 139 p.set Name(sp[1]);139 p.setDisplayName(sp[1]); 140 140 JMenu submenu = submenus.get(sp[0]); 141 141 if (submenu == null) { … … 144 144 Main.main.menu.presetsMenu.add(submenu); 145 145 } 146 submenu.add(new JMenuItem(p)); 146 if (sp[1].equals(" ")) 147 submenu.add(new JSeparator()); 148 else 149 submenu.add(p); 147 150 } 148 151 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r679 r680 332 332 */ 333 333 public void setName(String name) { 334 setDisplayName(tr(name)); 335 putValue("toolbar", "tagging_"+name); 336 } 337 338 /** 339 * Change the display name without changing the toolbar value. 340 */ 341 public void setDisplayName(String name) { 334 342 putValue(Action.NAME, tr(name)); 335 putValue("toolbar", "tagging_"+name);336 343 } 337 344
Note:
See TracChangeset
for help on using the changeset viewer.