Fix bug with not working toggles 'rectrict joins' and 'restrict team adding'
authorunc0rr
Mon, 23 Feb 2009 18:41:16 +0000
changeset 1828 ba91a89f449a
parent 1827 3bb5e22b7f9a
child 1829 0cd14c9b1fe0
Fix bug with not working toggles 'rectrict joins' and 'restrict team adding'
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Mon Feb 23 18:35:32 2009 +0000
+++ b/QTfrontend/hwform.cpp	Mon Feb 23 18:41:16 2009 +0000
@@ -792,6 +792,10 @@
 	
 	if (hwnet)
 	{
+		// disconnect connections first to ensure their inexistance and not to connect twice
+		ui.pageNetGame->startGame->disconnect(hwnet);
+		ui.pageNetGame->restrictJoins->disconnect(hwnet);
+		ui.pageNetGame->restrictTeamAdds->disconnect(hwnet);
 		connect(ui.pageNetGame->startGame, SIGNAL(triggered()), hwnet, SLOT(startGame()));
 		connect(ui.pageNetGame->restrictJoins, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictJoins()));
 		connect(ui.pageNetGame->restrictTeamAdds, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictTeamAdds()));