From: jprocter Date: Fri, 23 Sep 2011 13:01:02 +0000 (+0100) Subject: ensure blog window gets put to front after dialogs close (JAL-943) X-Git-Tag: Release_2_7~26 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d99d6a98cd0a7009e94ca4166f48741af75cde1e;p=jalview.git ensure blog window gets put to front after dialogs close (JAL-943) --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index bb84612..e1356b4 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -1986,6 +1986,17 @@ public class Desktop extends jalview.jbgui.GDesktop implements } + /** + * fixes stacking order after a modal dialog to ensure windows that should be on top actually are + */ + public void relayerWindows() + { + if (jvnews!=null && jvnews.isVisible()) + { + jvnews.toFront(); + } + } + protected JMenuItem groovyShell; public void doGroovyCheck() diff --git a/src/jalview/gui/PromptUserConfig.java b/src/jalview/gui/PromptUserConfig.java index ac15f2b..942b20a 100644 --- a/src/jalview/gui/PromptUserConfig.java +++ b/src/jalview/gui/PromptUserConfig.java @@ -206,6 +206,12 @@ public class PromptUserConfig implements Runnable (allowCancel) ? JOptionPane.YES_NO_CANCEL_OPTION : JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); + // now, ask the desktop to relayer any external windows that might have been obsured + if (Desktop.instance!=null) + { + Desktop.instance.relayerWindows(); + } + // and finish parsing the result jalview.bin.Cache.log.debug("Got response : " + reply); if (reply == JOptionPane.YES_OPTION) {