QTfrontend/hwform.cpp
changeset 1347 1102e19780b9
parent 1344 4004e597f1bf
child 1354 a8dcdeb88a43
--- a/QTfrontend/hwform.cpp	Mon Oct 13 12:58:44 2008 +0000
+++ b/QTfrontend/hwform.cpp	Mon Oct 13 14:44:15 2008 +0000
@@ -282,11 +282,14 @@
 		  curTeamSelWidget->resetPlayingTeams(teamsList);
 		}
 	}
+
+	if (id == ID_PAGE_ROOMSLIST && lastid == ID_PAGE_NETCFG)
+		GoBack();
 }
 
 void HWForm::GoToPage(quint8 id)
 {
-	quint8 lastid=ui.Pages->currentIndex();
+	quint8 lastid = ui.Pages->currentIndex();
 	PagesStack.push(ui.Pages->currentIndex());
 	OnPageShown(id, lastid);
 	ui.Pages->setCurrentIndex(id);
@@ -295,11 +298,12 @@
 void HWForm::GoBack()
 {
 	if (!PagesStack.isEmpty() && PagesStack.top() == ID_PAGE_NET) {
-	  if(hwnet || pnetserver) NetDisconnect();
+		if(hwnet || pnetserver) NetDisconnect();
 	}
 	quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop();
-	OnPageShown(id, ui.Pages->currentIndex());
+	quint8 curid = ui.Pages->currentIndex();
 	ui.Pages->setCurrentIndex(id);
+	OnPageShown(id, curid);
 }
 
 void HWForm::btnExitPressed()