diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 916a2a35..98d1e0bb 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -681,6 +681,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent) connect(this, SIGNAL(signalNetClientPlayerChanged(unsigned, QString)), myStartNetworkGameDialog, SLOT(updatePlayer(unsigned, QString))); connect(this, SIGNAL(signalNetClientPlayerLeft(unsigned, QString)), myStartNetworkGameDialog, SLOT(removePlayer(unsigned, QString))); connect(this, SIGNAL(signalNetClientNewGameAdmin(unsigned, QString)), myStartNetworkGameDialog, SLOT(newGameAdmin(unsigned, QString))); + connect(this, SIGNAL(signalNetClientGameListNew(unsigned)), myStartNetworkGameDialog, SLOT(gameCreated(unsigned))); connect(this, SIGNAL(signalNetClientSelfJoined(unsigned, QString, int)), myGameLobbyDialog, SLOT(joinedNetworkGame(unsigned, QString, int))); connect(this, SIGNAL(signalNetClientPlayerJoined(unsigned, QString, int)), myGameLobbyDialog, SLOT(addConnectedPlayer(unsigned, QString, int))); diff --git a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp index f4063e9c..b266f502 100644 --- a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp +++ b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp @@ -45,9 +45,6 @@ startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent, ConfigFi void startNetworkGameDialogImpl::exec() { - GameInfo info = mySession->getClientGameInfo(0); - label_maxPlayerNumber->setText(QString::number(info.data.maxNumberOfPlayers)); - QDialog::exec(); } @@ -132,6 +129,12 @@ void startNetworkGameDialogImpl::newGameAdmin(unsigned playerId, QString) } } +void startNetworkGameDialogImpl::gameCreated(unsigned /*gameId*/) +{ + GameInfo info = mySession->getClientGameInfo(0); + label_maxPlayerNumber->setText(QString::number(info.data.maxNumberOfPlayers)); +} + void startNetworkGameDialogImpl::playerSelected(QTreeWidgetItem* item, QTreeWidgetItem*) { if (item) @@ -183,6 +186,7 @@ void startNetworkGameDialogImpl::clearDialog() treeWidget->clear(); myChat->clearChat(); checkBox_fillUpWithComputerOpponents->hide(); + label_maxPlayerNumber->setText(QString::number(0)); myPlayerId = 0; } diff --git a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h index 6a854005..35c2dfad 100644 --- a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h +++ b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h @@ -52,6 +52,8 @@ public slots: void removePlayer(unsigned playerId, QString playerName); void newGameAdmin(unsigned playerId, QString playerName); + void gameCreated(unsigned gameId); + void playerSelected(QTreeWidgetItem*, QTreeWidgetItem*); void kickPlayer(); void checkPlayerQuantity();