mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#381) Handle key press events in new tree view
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
|
||||
#include "cvfTimer.h"
|
||||
#include "RimTreeViewStateSerializer.h"
|
||||
#include "RiuTreeViewEventFilter.h"
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
@@ -570,12 +571,16 @@ void RiuMainWindow::createDockPanels()
|
||||
m_projectTreeView->treeView()->setHeaderHidden(true);
|
||||
m_projectTreeView->treeView()->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
|
||||
// TODO :Drag and drop configuration
|
||||
// Drag and drop configuration
|
||||
m_projectTreeView->treeView()->setDragEnabled(true);
|
||||
m_projectTreeView->treeView()->viewport()->setAcceptDrops(true);
|
||||
m_projectTreeView->treeView()->setDropIndicatorShown(true);
|
||||
m_projectTreeView->treeView()->setDragDropMode(QAbstractItemView::DragDrop);
|
||||
|
||||
// Install event filter used to handle key press events
|
||||
RiuTreeViewEventFilter* treeViewEventFilter = new RiuTreeViewEventFilter(this);
|
||||
m_projectTreeView->treeView()->installEventFilter(treeViewEventFilter);
|
||||
|
||||
addDockWidget(Qt::RightDockWidgetArea, dockWidget);
|
||||
|
||||
connect(m_projectTreeView, SIGNAL(selectionChanged()), this, SLOT(selectedObjectsChanged()));
|
||||
|
||||
Reference in New Issue
Block a user