Merge branch 'master' into new_panels_with_context_buttons
[situare] / src / ui / mainwindow.cpp
index 970e369..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);
@@ -351,10 +353,10 @@ void MainWindow::buildPanels()
             m_mapView, SLOT(enableCenterShift()));
 
     connect(m_tabbedPanel, SIGNAL(panelClosed()),
-                m_userInfoPanel, SIGNAL(collapse()));
+            m_userInfoPanel, SIGNAL(collapse()));
 
     connect(m_tabbedPanel, SIGNAL(currentChanged(int)),
-                m_userInfoPanel, SIGNAL(collapse()));
+            m_userInfoPanel, SIGNAL(collapse()));
 }
 
 void MainWindow::buildRoutingPanel()
@@ -366,10 +368,8 @@ void MainWindow::buildRoutingPanel()
     connect(this, SIGNAL(locationDataParsed(const QList<Location>&)),
             m_routingPanel, SLOT(populateLocationListView(const QList<Location>&)));
 
-    connect(m_routingPanel,
-            SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)),
-            this,
-            SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)));
+    connect(m_routingPanel, SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)),
+            this, SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)));
 
     connect(m_routingPanel, SIGNAL(routeToLocation(const GeoCoordinate&)),
             this, SIGNAL(routeTo(const GeoCoordinate&)));
@@ -382,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()