- Timestamp:
- 2014-08-15T22:50:14+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r7401 r7407 88 88 private Icon icon; 89 89 private boolean modal; 90 private boolean focusOnDefaultButton = false; 90 91 91 92 /** true, if the dialog should include a help button */ … … 278 279 getRootPane().setDefaultButton(defaultButton); 279 280 } 280 fixFocus(); 281 // Don't focus the "do not show this again" check box, but the default button. 282 if (toggleable || focusOnDefaultButton) { 283 requestFocusToDefaultButton(); 284 } 281 285 setVisible(true); 282 286 toggleSaveState(); … … 558 562 559 563 /** 560 * Always makes sure the default button has initial focus. 561 */ 562 protected void fixFocus() { 564 * Makes default button request initial focus or not. 565 * @param focus {@code true} to make default button request initial focus 566 * @since 7407 567 */ 568 public void setFocusOnDefaultButton(boolean focus) { 569 focusOnDefaultButton = focus; 570 } 571 572 private void requestFocusToDefaultButton() { 563 573 if (defaultButton != null) { 564 574 GuiHelper.runInEDT(new Runnable() { -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r7401 r7407 106 106 } 107 107 ed.setContent(pnl); 108 ed.setFocusOnDefaultButton(true); 108 109 ed.showDialog(); 109 110 if (cbSuppress != null && cbSuppress.isSelected()) {
Note:
See TracChangeset
for help on using the changeset viewer.