Select appropriate schemes when taking room control (bug 461)
authorWuzzy <Wuzzy2@mail.ru>
Fri, 19 Apr 2019 04:48:30 +0200
changeset 14815 583d8b96fb30
parent 14814 c2793ff4e887
child 14816 d65e25e211d4
Select appropriate schemes when taking room control (bug #461)
QTfrontend/hwform.cpp
QTfrontend/ui/widget/gamecfgwidget.cpp
QTfrontend/ui/widget/gamecfgwidget.h
--- a/QTfrontend/hwform.cpp	Thu Apr 18 20:02:45 2019 +0200
+++ b/QTfrontend/hwform.cpp	Fri Apr 19 04:48:30 2019 +0200
@@ -1937,6 +1937,7 @@
     ui.pageNetGame->pGameCFG->GameSchemes->setModel(gameSchemeModel);
     ui.pageNetGame->pGameCFG->setMaster(true);
     ui.pageNetGame->pNetTeamsWidget->setInteractivity(true);
+    ui.pageNetGame->pGameCFG->resetSchemeStates();
 
     if (hwnet)
     {
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Thu Apr 18 20:02:45 2019 +0200
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Fri Apr 19 04:48:30 2019 +0200
@@ -548,6 +548,11 @@
     }
 }
 
+void GameCFGWidget::resetSchemeStates()
+{
+    updateSchemeEnabledStates(Scripts->currentIndex());
+}
+
 void GameCFGWidget::updateSchemeEnabledStates(int scriptIndex)
 {
     QString scheme;
--- a/QTfrontend/ui/widget/gamecfgwidget.h	Thu Apr 18 20:02:45 2019 +0200
+++ b/QTfrontend/ui/widget/gamecfgwidget.h	Fri Apr 19 04:48:30 2019 +0200
@@ -61,6 +61,7 @@
         void fullNetConfig();
         void resendSchemeData();
         void resendAmmoData();
+        void resetSchemeStates();
         void setMaster(bool master);
         void setTabbed(bool tabbed);
 
@@ -77,11 +78,11 @@
         void seedChanged(const QString &);
         void themeChanged(const QString &);
         void schemeChanged(int);
+        void updateSchemeEnabledStates(int scriptIndex);
         void scriptChanged(int);
         void jumpToSchemes();
         void jumpToWeapons();
         void mapgenChanged(MapGenerator m);
-        void updateSchemeEnabledStates(int scriptIndex);
         void maze_sizeChanged(int s);
         void slMapFeatureSizeChanged(int s);
         void onDrawnMapChanged(const QByteArray & data);