Removed disabled button states, don't open panel without buttons
[situare] / src / ui / friendlistpanel.cpp
index 5e461e5..3827746 100644 (file)
@@ -83,9 +83,6 @@ FriendListPanel::FriendListPanel(QWidget *parent)
             this, SIGNAL(findFriend(GeoCoordinate)));
 
     connect(m_friendListView, SIGNAL(listItemSelectionChanged()),
-            this, SLOT(setRouteButtonDisabled()));
-
-    connect(m_friendListView, SIGNAL(listItemSelectionChanged()),
             this, SLOT(onListItemSelectionChanged()));
 
     // --- FOOTER, TEXT BASED FILTERING ---
@@ -124,7 +121,6 @@ FriendListPanel::FriendListPanel(QWidget *parent)
     m_routeButton = new ImageButton(":res/images/route_to_friend.png",
                                     ":res/images/route_to_friend_s.png",
                                     ":res/images/route_to_friend_d.png", this);
-    m_routeButton->setDisabled(true);
     connect(m_routeButton, SIGNAL(clicked()),
             this, SLOT(routeToSelectedFriend()));
 
@@ -150,7 +146,6 @@ void FriendListPanel::anyPanelClosed()
     clearFiltering();
 
     m_friendListView->clearItemSelection();
-    setRouteButtonDisabled();
 }
 
 void FriendListPanel::anyPanelOpened()
@@ -239,7 +234,6 @@ void FriendListPanel::hideEvent(QHideEvent *event)
     clearFiltering();
 
     m_friendListView->clearItemSelection();
-    setRouteButtonDisabled();
 }
 
 void FriendListPanel::routeToSelectedFriend()
@@ -273,13 +267,6 @@ void FriendListPanel::updateKeyboardGrabbing()
     }
 }
 
-void FriendListPanel::setRouteButtonDisabled()
-{
-    qDebug() << __PRETTY_FUNCTION__;
-
-    m_routeButton->setDisabled(m_friendListView->selectedItems().isEmpty());
-}
-
 void FriendListPanel::showEvent(QShowEvent *event)
 {
     qDebug() << __PRETTY_FUNCTION__;