QTfrontend/hwform.cpp
changeset 7842 d1c0e4341165
parent 7826 9f529722d61e
child 7860 a90936219ffa
--- a/QTfrontend/hwform.cpp	Sat Oct 27 20:05:52 2012 +0200
+++ b/QTfrontend/hwform.cpp	Sat Oct 27 22:23:41 2012 +0400
@@ -1291,11 +1291,12 @@
         QString errorStr = QMessageBox::tr("Connection to server is lost") + (reason.isEmpty()?"":("\n\n" + HWNewNet::tr("Quit reason: ") + '"' + reason +'"'));
         ShowErrorMessage(errorStr);
     }
-    if (ui.Pages->currentIndex() != ID_PAGE_NET)
+
+    while (ui.Pages->currentIndex() != ID_PAGE_NET
+        && ui.Pages->currentIndex() != ID_PAGE_NETTYPE
+        && ui.Pages->currentIndex() != ID_PAGE_MAIN)
     {
-        while (!PagesStack.isEmpty()) PagesStack.pop();
-        PagesStack.push(ID_PAGE_MAIN);
-        GoToPage(ID_PAGE_NET);
+        GoBack();
     }
 }