if (index.isValid() && (index.column() == DolphinModel::Name)) {
m_item = itemForIndex(index);
+ connect(m_view->model(), SIGNAL(rowsRemoved(const QModelIndex&, int, int)),
+ this, SLOT(slotRowsRemoved(const QModelIndex&, int, int)));
+
const QRect rect = m_view->visualRect(index);
const int gap = 2;
const int x = rect.right() - m_button->width() - gap;
m_button->show();
} else {
m_item = KFileItem();
+ disconnect(m_view->model(), SIGNAL(rowsRemoved(const QModelIndex&, int, int)),
+ this, SLOT(slotRowsRemoved(const QModelIndex&, int, int)));
}
}
void SelectionManager::slotViewportEntered()
{
m_button->hide();
- m_item = KFileItem();
}
void SelectionManager::setItemSelected(bool selected)
}
}
+void SelectionManager::slotRowsRemoved(const QModelIndex& parent, int start, int end)
+{
+ Q_UNUSED(parent);
+ Q_UNUSED(start);
+ Q_UNUSED(end);
+ m_button->hide();
+}
+
KFileItem SelectionManager::itemForIndex(const QModelIndex& index) const
{
QAbstractProxyModel* proxyModel = static_cast<QAbstractProxyModel*>(m_view->model());
void slotEntered(const QModelIndex& index);
void slotViewportEntered();
void setItemSelected(bool selected);
+ void slotRowsRemoved(const QModelIndex& parent, int start, int end);
private:
KFileItem itemForIndex(const QModelIndex& index) const;