diff options
| author | John Tapsell <[email protected]> | 2007-12-03 00:29:56 +0000 |
|---|---|---|
| committer | John Tapsell <[email protected]> | 2007-12-03 00:29:56 +0000 |
| commit | 396d620466e2a3042650d95b114e79e7d32c970b (patch) | |
| tree | 5fcb8d33989bf423cdb8140418662f227267b634 /src/dolphinview.cpp | |
| parent | e71af0e7c12f43360078e98e49553731303ea891 (diff) | |
Share the selection model. Does not fix the selections yet though
svn path=/trunk/KDE/kdebase/apps/; revision=744230
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 51e2a0a57..ad66e5ad7 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -72,6 +72,7 @@ DolphinView::DolphinView(QWidget* parent, m_detailsView(0), m_columnView(0), m_fileItemDelegate(0), + m_selectionModel(0), m_dolphinModel(dolphinModel), m_dirLister(dirLister), m_proxyModel(proxyModel) @@ -863,6 +864,13 @@ void DolphinView::createView() view->setItemDelegate(m_fileItemDelegate); view->setModel(m_proxyModel); + if(m_selectionModel) + view->setSelectionModel(m_selectionModel); + else + m_selectionModel = view->selectionModel(); + + m_selectionModel->setParent(this); //Reparent the selection model. We do not want it to be deleted when we delete the model + view->setSelectionMode(QAbstractItemView::ExtendedSelection); new KMimeTypeResolver(view, m_dolphinModel); |
