Changeset 5424 in josm for trunk/src/org
- Timestamp:
- 2012-08-11T18:49:02+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r5385 r5424 532 532 } 533 533 } 534 534 535 FocusAdapter focus = addFocusAdapter(-1, keys, values, autocomplete, defaultACItemComparator); 536 // fire focus event in advance or otherwise the popup list will be too small at first 537 focus.focusGained(null); 538 535 539 int recentTagsToShow = Main.pref.getInteger("properties.recently-added-tags", DEFAULT_LRU_TAGS_NUMBER); 536 540 if (recentTagsToShow > MAX_LRU_TAGS_NUMBER) { … … 538 542 } 539 543 List<JosmAction> recentTagsActions = new ArrayList<JosmAction>(); 540 suggestRecentlyAddedTags(p, keys, values, recentTagsActions, recentTagsToShow); 541 542 FocusAdapter focus = addFocusAdapter(-1, keys, values, autocomplete, defaultACItemComparator); 543 // fire focus event in advance or otherwise the popup list will be too small at first 544 focus.focusGained(null); 544 suggestRecentlyAddedTags(p, keys, values, recentTagsActions, recentTagsToShow, focus); 545 545 546 546 JOptionPane pane = new JOptionPane(p, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION){ … … 580 580 } 581 581 582 private void suggestRecentlyAddedTags(JPanel p, final AutoCompletingComboBox keys, final AutoCompletingComboBox values, List<JosmAction> tagsActions, int tagsToShow ) {582 private void suggestRecentlyAddedTags(JPanel p, final AutoCompletingComboBox keys, final AutoCompletingComboBox values, List<JosmAction> tagsActions, int tagsToShow, final FocusAdapter focus) { 583 583 if (tagsToShow > 0 && !recentTags.isEmpty()) { 584 584 p.add(new JLabel(tr("Recently added tags")), GBC.eol()); … … 607 607 keys.getEditor().setItem(t.getKey()); 608 608 values.getEditor().setItem(t.getValue()); 609 // Update list of values (fix #7951) 610 focus.focusGained(null); 609 611 } 610 612 };
Note:
See TracChangeset
for help on using the changeset viewer.