mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Client - After reconnect still active game or deck editor of build step gets topmost panel again (because tablesPanel is loaded automatically now after connect to server).
This commit is contained in:
parent
8bf5f01c2e
commit
865665767b
2 changed files with 8 additions and 4 deletions
|
|
@ -712,7 +712,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
||||
logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername);
|
||||
if (MageFrame.connect(connection)) {
|
||||
showGames();
|
||||
showGames(false);
|
||||
return true;
|
||||
} else {
|
||||
showMessage("Unable to connect to server");
|
||||
|
|
@ -888,7 +888,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}//GEN-LAST:event_btnDeckEditorActionPerformed
|
||||
|
||||
private void btnGamesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGamesActionPerformed
|
||||
this.showGames();
|
||||
this.showGames(true);
|
||||
}//GEN-LAST:event_btnGamesActionPerformed
|
||||
|
||||
private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExitActionPerformed
|
||||
|
|
@ -970,10 +970,14 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
this.tablesPane.hideTables();
|
||||
}
|
||||
|
||||
public void showGames() {
|
||||
public void showGames(boolean setActive) {
|
||||
MagePane topPane = getTopMost(tablesPane);
|
||||
this.tablesPane.setVisible(true);
|
||||
this.tablesPane.showTables();
|
||||
setActive(tablesPane);
|
||||
if (!setActive && topPane != null) {
|
||||
setActive(topPane);
|
||||
}
|
||||
}
|
||||
|
||||
public void hideGames() {
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ public class ConnectDialog extends MageDialog {
|
|||
if (result) {
|
||||
lblStatus.setText("");
|
||||
connected();
|
||||
MageFrame.getInstance().showGames();
|
||||
MageFrame.getInstance().showGames(false);
|
||||
} else {
|
||||
lblStatus.setText("Could not connect");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue