Fixed the RoutingPanel to work also with routes coming from the FriendListPanel
authorSami Rämö <sami.ramo@ixonos.com>
Thu, 26 Aug 2010 10:29:22 +0000 (13:29 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Thu, 26 Aug 2010 10:29:22 +0000 (13:29 +0300)
src/ui/routingpanel.cpp

index 229875a..daed223 100644 (file)
@@ -218,6 +218,17 @@ void RoutingPanel::setRoute(Route &route)
 
     m_routeWaypointListView->scrollToTop();
 
+    // route might come from FriendListPanel's route to friend button, so we have to
+    // check the routing button without emitting new routing request
+    blockSignals(true);
+    m_routeButton->setEnabled(true);
+    m_routeButton->setChecked(true);
+    blockSignals(false);
+    m_searchLocationButton->setChecked(false);
+    // search location button might be already false, so we have to make sure the
+    // toggle action handler is caller every time
+    searchLocationButtonToggled(false);
+
     emit showPanelRequested(this);
 }