Changeset 9304 in josm
- Timestamp:
- 2016-01-04T17:23:16+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r9231 r9304 322 322 @Override 323 323 public void actionPerformed(ActionEvent ae) { 324 String res = getSelectedPreset().getToolbarString(); 325 Main.toolbar.addCustomButton(res, -1, false); 324 final TaggingPreset preset = lsResult.getSelectedValue(); 325 if (preset != null) { 326 Main.toolbar.addCustomButton(preset.getToolbarString(), -1, false); 327 } 326 328 } 327 329 }); … … 354 356 text, onlyApplicable, inTags, getTypesInSelection(), selected); 355 357 356 TaggingPreset oldPreset = getSelectedPreset();358 final TaggingPreset oldPreset = lsResult.getSelectedValue(); 357 359 lsResultModel.setPresets(result); 358 TaggingPreset newPreset = getSelectedPreset();360 final TaggingPreset newPreset = lsResult.getSelectedValue(); 359 361 if (!Objects.equals(oldPreset, newPreset)) { 360 362 int[] indices = lsResult.getSelectedIndices(); … … 522 524 523 525 /** 524 * Determines, which preset is selected at the current moment526 * Determines, which preset is selected at the moment. Updates {@link PresetClassification#favoriteIndex}! 525 527 * @return selected preset (as action) 526 528 */
Note:
See TracChangeset
for help on using the changeset viewer.