mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added drag and drop support.
Implemented our own insertRows/deleteRows to avoid bug caused by default drag and drop behaviour of Qt https://bugreports.qt-project.org/browse/QTBUG-26229 https://bugreports.qt-project.org/browse/QTBUG-6679 p4#: 21028
This commit is contained in:
@@ -377,15 +377,11 @@ void RIMainWindow::createDockPanels()
|
||||
m_treeView->setModel(m_treeModelPdm);
|
||||
m_treeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
|
||||
// Must be enabled for drag and drop
|
||||
/*
|
||||
m_treeView->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
// Drag and drop configuration
|
||||
m_treeView->setDragEnabled(true);
|
||||
m_treeView->viewport()->setAcceptDrops(true);
|
||||
m_treeView->setDropIndicatorShown(true);
|
||||
m_treeView->setDragDropMode(QAbstractItemView::InternalMove);
|
||||
*/
|
||||
|
||||
m_treeView->setDragDropMode(QAbstractItemView::DragDrop);
|
||||
|
||||
dockWidget->setWidget(m_treeView);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user