QTfrontend/hwform.cpp
changeset 1899 5763f46d7486
parent 1898 f0ab0c77946d
child 1902 aeadb10c2d77
--- a/QTfrontend/hwform.cpp	Mon Mar 16 20:55:10 2009 +0000
+++ b/QTfrontend/hwform.cpp	Wed Mar 18 15:48:43 2009 +0000
@@ -832,9 +832,25 @@
 
 void HWForm::NetGameSlave()
 {
+	if (hwnet)
+	{
+		NetAmmoSchemeModel * netAmmo = new NetAmmoSchemeModel(hwnet);
+		connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)), netAmmo, SLOT(setNetSchemeConfig(QStringList &)));
+		ui.pageNetGame->pGameCFG->GameSchemes->setModel(netAmmo);
+
+		ui.pageNetGame->pGameCFG->GameSchemes->view()->disconnect(hwnet);
+		connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)),
+				this, SLOT(selectFirstNetScheme()));
+	}
+
 	ui.pageNetGame->setMasterMode(false);
 }
 
+void HWForm::selectFirstNetScheme()
+{
+	ui.pageNetGame->pGameCFG->GameSchemes->setCurrentIndex(0);
+}
+
 void HWForm::NetLeftRoom()
 {
 	if (ui.Pages->currentIndex() == ID_PAGE_NETGAME)