Change net button back on leaving main page.
authornemo
Sat, 11 May 2013 21:19:44 -0400
changeset 8977 d424c7f8b342
parent 8976 5d9f43ad036a
child 8978 e6ef8fe314bd
Change net button back on leaving main page.
QTfrontend/hwform.cpp
QTfrontend/ui/page/pagemain.cpp
QTfrontend/ui/page/pagemain.h
--- a/QTfrontend/hwform.cpp	Sat May 11 21:14:25 2013 -0400
+++ b/QTfrontend/hwform.cpp	Sat May 11 21:19:44 2013 -0400
@@ -598,6 +598,10 @@
 #endif
 
     qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id)));
+    if (lastid == ID_PAGE_MAIN)
+    {
+        ui.pageMain->toggleNetworkChoice();
+    }
 
     // pageEnter and pageLeave events
     ((AbstractPage*)ui.Pages->widget(lastid))->triggerPageLeave();
--- a/QTfrontend/ui/page/pagemain.cpp	Sat May 11 21:14:25 2013 -0400
+++ b/QTfrontend/ui/page/pagemain.cpp	Sat May 11 21:19:44 2013 -0400
@@ -120,8 +120,8 @@
 void PageMain::connectSignals()
 {
     connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
-    connect(BtnNetLocal, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
-    connect(BtnNetOfficial, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
+    //connect(BtnNetLocal, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
+    //connect(BtnNetOfficial, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
     // TODO: add signal-forwarding required by (currently missing) encapsulation
 }
 
--- a/QTfrontend/ui/page/pagemain.h	Sat May 11 21:14:25 2013 -0400
+++ b/QTfrontend/ui/page/pagemain.h	Sat May 11 21:19:44 2013 -0400
@@ -41,6 +41,9 @@
         QPushButton * BtnVideos;
         QLabel * mainNote;
 
+    public slots:
+        void toggleNetworkChoice();
+
     private:
         QLayout * bodyLayoutDefinition();
         QLayout * footerLayoutDefinition();
@@ -49,8 +52,6 @@
 
         QString randomTip() const;
 
-    private slots:
-        void toggleNetworkChoice();
 };
 
 #endif