mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't set focus to preferred component on every activation
This commit is contained in:
@@ -491,6 +491,7 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra
|
||||
private Dimension myInitialSize;
|
||||
private String myDimensionServiceKey;
|
||||
private boolean myOpened = false;
|
||||
private boolean myActivated = false;
|
||||
|
||||
private FocusTrackback myFocusTrackback;
|
||||
private MyDialog.MyWindowListener myWindowListener;
|
||||
@@ -896,7 +897,10 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (myActivated) {
|
||||
return;
|
||||
}
|
||||
myActivated = true;
|
||||
JComponent toFocus = wrapper == null ? null : wrapper.getPreferredFocusedComponent();
|
||||
if (toFocus == null) {
|
||||
toFocus = getRootPane().getDefaultButton();
|
||||
|
||||
Reference in New Issue
Block a user