UI: fixed windows layer problems when old window overlapped new window (see #4318, #4320 and other)

This commit is contained in:
Oleg Agafonov 2018-01-01 18:00:42 +04:00
parent 89f8b1420e
commit 78d036b6bb
9 changed files with 74 additions and 20 deletions

View file

@ -165,7 +165,11 @@ public class PickChoiceDialog extends MageDialog {
}
// window settings
MageFrame.getDesktop().add(this, JLayeredPane.PALETTE_LAYER);
if (this.isModal()){
MageFrame.getDesktop().add(this, JLayeredPane.MODAL_LAYER);
}else{
MageFrame.getDesktop().add(this, JLayeredPane.PALETTE_LAYER);
}
if (mageDialogState != null) {
mageDialogState.setStateToDialog(this);
@ -174,7 +178,7 @@ public class PickChoiceDialog extends MageDialog {
this.setLocation(centered.x, centered.y);
GuiDisplayUtil.keepComponentInsideScreen(centered.x, centered.y, this);
}
// final load
loadData();