# HG changeset patch # User Wuzzy # Date 1555642110 -7200 # Node ID 583d8b96fb30858e29ea6fb23c46bc9b9f8063fa # Parent c2793ff4e8875e04af0bf40b14af1205a4868468 Select appropriate schemes when taking room control (bug 461) diff -r c2793ff4e887 -r 583d8b96fb30 QTfrontend/hwform.cpp --- 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) { diff -r c2793ff4e887 -r 583d8b96fb30 QTfrontend/ui/widget/gamecfgwidget.cpp --- 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; diff -r c2793ff4e887 -r 583d8b96fb30 QTfrontend/ui/widget/gamecfgwidget.h --- 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);