Removed disabled button states, don't open panel without buttons
[situare] / src / ui / locationsearchpanel.cpp
index b765744..c0d53a8 100644 (file)
@@ -60,9 +60,6 @@ LocationSearchPanel::LocationSearchPanel(QWidget *parent)
             SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)));
 
     connect(m_locationListView, SIGNAL(listItemSelectionChanged()),
-            this, SLOT(setRouteButtonDisabled()));
-
-    connect(m_locationListView, SIGNAL(listItemSelectionChanged()),
             this, SLOT(onListItemSelectionChanged()));
 
     QVBoxLayout *resultsListViewLayout = new QVBoxLayout;
@@ -83,8 +80,7 @@ LocationSearchPanel::LocationSearchPanel(QWidget *parent)
     panelLayout->addLayout(resultsListViewLayout);
 
     // --- CONTEXT BUTTONS ---
-    m_routeButton = new ImageButton(":res/images/compass.png", "", "", this);
-    m_routeButton->setDisabled(true);
+    m_routeButton = new ImageButton(":res/images/routing.png", "", "", this);
     connect(m_routeButton, SIGNAL(clicked()),
             this, SLOT(routeToSelectedLocation()));
 
@@ -102,8 +98,6 @@ void LocationSearchPanel::clearListsSelections()
     qDebug() << __PRETTY_FUNCTION__;
 
     m_locationListView->clearItemSelection();
-
-    setRouteButtonDisabled();
 }
 
 void LocationSearchPanel::hideEvent(QHideEvent *event)
@@ -159,10 +153,3 @@ void LocationSearchPanel::setHeaderText(int count)
 
     m_resultsLabel->setText(tr("Search results: %1").arg(count));
 }
-
-void LocationSearchPanel::setRouteButtonDisabled()
-{
-    qDebug() << __PRETTY_FUNCTION__;
-
-    m_routeButton->setDisabled(m_locationListView->selectedItems().isEmpty());
-}