mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
fixed issue 280
This commit is contained in:
parent
e2049409ab
commit
4c1d0728bc
1 changed files with 9 additions and 7 deletions
|
@ -453,10 +453,12 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
if (activeFrame != null)
|
||||
activeFrame.deactivated();
|
||||
activeFrame = frame;
|
||||
activeFrame.setVisible(true);
|
||||
activeFrame.toFront();
|
||||
try {
|
||||
activeFrame.setSelected(true);
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.error("Error setting " + frame.getTitle() + " active");
|
||||
}
|
||||
activeFrame.activated();
|
||||
}
|
||||
|
@ -860,13 +862,13 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
name = "Deck Editor - " + deck.getName();
|
||||
else
|
||||
name = "Deck Editor";
|
||||
}
|
||||
JInternalFrame[] windows = desktopPane.getAllFramesInLayer(JLayeredPane.DEFAULT_LAYER);
|
||||
for (JInternalFrame window : windows) {
|
||||
if (window instanceof DeckEditorPane) {
|
||||
if (window.getTitle().equals(name)) {
|
||||
setActive((MagePane)window);
|
||||
return;
|
||||
JInternalFrame[] windows = desktopPane.getAllFramesInLayer(JLayeredPane.DEFAULT_LAYER);
|
||||
for (JInternalFrame window : windows) {
|
||||
if (window instanceof DeckEditorPane) {
|
||||
if (window.getTitle().equals(name)) {
|
||||
setActive((MagePane)window);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue