@ -100,7 +100,7 @@ public abstract class UIControlPane extends JControlPane {
this . checkButtonEnabled ( ) ;
this . checkButtonEnabled ( ) ;
}
}
protected Window getPopupEditDialog ( ) {
protected Window getPopupEditDialog ( ) {
return this . popupEditDialog ;
return this . popupEditDialog ;
}
}
@ -241,6 +241,11 @@ public abstract class UIControlPane extends JControlPane {
private void hideDialog ( ) {
private void hideDialog ( ) {
if ( needToHidePopupEditDialog ( ) ) {
if ( needToHidePopupEditDialog ( ) ) {
//在Linux上拉回焦点,不然导致一些面板关不掉
if ( OperatingSystem . isLinux ( ) ) {
requestFocus ( ) ;
}
saveSettings ( ) ;
saveSettings ( ) ;
setVisible ( false ) ;
setVisible ( false ) ;
PopupDialogSaveAction saveAction = OSSupportCenter . getAction ( PopupDialogSaveAction . class ) ;
PopupDialogSaveAction saveAction = OSSupportCenter . getAction ( PopupDialogSaveAction . class ) ;
@ -252,10 +257,6 @@ public abstract class UIControlPane extends JControlPane {
addWindowFocusListener ( new WindowAdapter ( ) {
addWindowFocusListener ( new WindowAdapter ( ) {
@Override
@Override
public void windowLostFocus ( WindowEvent e ) {
public void windowLostFocus ( WindowEvent e ) {
//在Linux上拉回焦点,不然导致一些面板关不掉
if ( OperatingSystem . isLinux ( ) ) {
requestFocus ( ) ;
}
hideDialog ( ) ;
hideDialog ( ) ;
}
}
} ) ;
} ) ;
@ -263,8 +264,8 @@ public abstract class UIControlPane extends JControlPane {
}
}
/ * *
/ * *
* 是否需要隐藏popupEditDialog
* 是否需要隐藏popupEditDialog
* /
* /
protected boolean needToHidePopupEditDialog ( ) {
protected boolean needToHidePopupEditDialog ( ) {
// 检查是否有子弹窗,如果有,则不隐藏
// 检查是否有子弹窗,如果有,则不隐藏
for ( Window window : popupEditDialog . getOwnedWindows ( ) ) {
for ( Window window : popupEditDialog . getOwnedWindows ( ) ) {