// The selection model might change in the case of the column view. Disconnect
// from the current selection model and reconnect later after the URL switch.
+ const bool hadSelection = hasSelection();
QAbstractItemView* view = m_viewAccessor.itemView();
disconnect(view->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection)));
view = m_viewAccessor.itemView();
connect(view->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection)));
+ if (hadSelection || hasSelection()) {
+ emitSelectionChangedSignal();
+ }
}
void DolphinView::selectAll()
void DolphinView::emitSelectionChangedSignal()
{
- emit selectionChanged(DolphinView::selectedItems());
+ m_selectionChangedTimer->stop();
+ emit selectionChanged(selectedItems());
}
void DolphinView::openContextMenu(const QPoint& pos,