mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 08:21:22 +00:00
Share the selection model. Does not fix the selections yet though
svn path=/trunk/KDE/kdebase/apps/; revision=744230
This commit is contained in:
parent
e71af0e7c1
commit
396d620466
|
@ -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);
|
||||
|
|
|
@ -690,6 +690,7 @@ private:
|
|||
DolphinDetailsView* m_detailsView;
|
||||
DolphinColumnView* m_columnView;
|
||||
KFileItemDelegate* m_fileItemDelegate;
|
||||
QItemSelectionModel *m_selectionModel;
|
||||
|
||||
DolphinModel* m_dolphinModel;
|
||||
KDirLister* m_dirLister;
|
||||
|
|
Loading…
Reference in a new issue