diff options
| author | Peter Penz <[email protected]> | 2010-10-09 16:32:02 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-10-09 16:32:02 +0000 |
| commit | 71454158cc72d071b99789ffcf4e18f7184c765d (patch) | |
| tree | c450e44df28e64423f805496235e827bef4b1291 /src/views/dolphinview.cpp | |
| parent | 53c36c4758d1e163ff66f0ffb5f27af415527cf9 (diff) | |
After disconnecting and reconnecting to the selectionChangedSignal() it must be checked, whether the selection got reset in the meantime.
svn path=/trunk/KDE/kdebase/apps/; revision=1184262
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index ad886acf2..238ce7ebc 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -537,6 +537,7 @@ void DolphinView::setUrl(const KUrl& url) // 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))); @@ -558,6 +559,9 @@ void DolphinView::setUrl(const KUrl& url) view = m_viewAccessor.itemView(); connect(view->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection))); + if (hadSelection || hasSelection()) { + emitSelectionChangedSignal(); + } } void DolphinView::selectAll() @@ -832,7 +836,8 @@ void DolphinView::slotSelectionChanged(const QItemSelection& selected, const QIt void DolphinView::emitSelectionChangedSignal() { - emit selectionChanged(DolphinView::selectedItems()); + m_selectionChangedTimer->stop(); + emit selectionChanged(selectedItems()); } void DolphinView::openContextMenu(const QPoint& pos, |
