┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/selectionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/selectionmanager.cpp')
-rw-r--r--src/selectionmanager.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/selectionmanager.cpp b/src/selectionmanager.cpp
index 1f9d99b85..31ad70b74 100644
--- a/src/selectionmanager.cpp
+++ b/src/selectionmanager.cpp
@@ -47,14 +47,18 @@ SelectionManager::SelectionManager(QAbstractItemView* parent) :
m_button->hide();
connect(m_button, SIGNAL(clicked(bool)),
this, SLOT(setItemSelected(bool)));
- connect(m_view->selectionModel(), SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()));
}
SelectionManager::~SelectionManager()
{
}
+void SelectionManager::reset()
+{
+ m_button->hide();
+ m_item = KFileItem();
+}
+
void SelectionManager::slotEntered(const QModelIndex& index)
{
m_button->hide();
@@ -88,15 +92,6 @@ void SelectionManager::slotViewportEntered()
m_item = KFileItem();
}
-void SelectionManager::slotSelectionChanged()
-{
- const QModelIndex index = indexForItem(m_item);
- if (index.isValid()) {
- QItemSelectionModel* selModel = m_view->selectionModel();
- m_button->setChecked(selModel->isSelected(index));
- }
-}
-
void SelectionManager::setItemSelected(bool selected)
{
emit selectionChanged();