Merge branch 'master' into new_panels_with_context_buttons
[situare] / src / ui / mainwindow.cpp
index a4cf029..576c238 100644 (file)
@@ -90,11 +90,13 @@ MainWindow::MainWindow(QWidget *parent)
     setWindowTitle(tr("Situare"));
 
     // set stacking order of widgets (from top to bottom)
-    // if the fullscreen button exists, then it is the topmost one, otherwise the tabbed panel is
+    // m_tabbedPanel is the topmost one
     if (m_fullScreenButton) {
-        m_tabbedPanel->stackUnder(m_fullScreenButton);
+        m_fullScreenButton->stackUnder(m_tabbedPanel);
+        m_crosshair->stackUnder(m_fullScreenButton);
+    } else {
+        m_crosshair->stackUnder(m_tabbedPanel);
     }
-    m_crosshair->stackUnder(m_tabbedPanel);
     m_zoomButtonPanel->stackUnder(m_crosshair);
     m_indicatorButtonPanel->stackUnder(m_zoomButtonPanel);
     m_osmLicense->stackUnder(m_indicatorButtonPanel);
@@ -349,6 +351,12 @@ void MainWindow::buildPanels()
 
     connect(m_tabbedPanel, SIGNAL(panelOpened()),
             m_mapView, SLOT(enableCenterShift()));
+
+    connect(m_tabbedPanel, SIGNAL(panelClosed()),
+            m_userInfoPanel, SIGNAL(collapse()));
+
+    connect(m_tabbedPanel, SIGNAL(currentChanged(int)),
+            m_userInfoPanel, SIGNAL(collapse()));
 }
 
 void MainWindow::buildRoutingPanel()
@@ -374,6 +382,9 @@ void MainWindow::buildRoutingPanel()
 
     connect(m_routingPanel, SIGNAL(requestSearchLocation()),
             this, SLOT(startLocationSearch()));
+
+    connect(m_routingPanel, SIGNAL(clearRoute()),
+            this, SIGNAL(clearRoute()));
 }
 
 void MainWindow::buildUserInfoPanel()