mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure drag'n'drop works when explorer window is undocked, too.
This commit is contained in:
parent
db589c7e32
commit
534e74dd31
@ -19,8 +19,6 @@
|
||||
|
||||
#include "RiuDragDrop.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h"
|
||||
#include "RicCloseCaseFeature.h"
|
||||
#include "WellLogCommands/RicNewWellLogFileCurveFeature.h"
|
||||
@ -242,7 +240,7 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
|
||||
{
|
||||
Qt::ItemFlags itemflags;
|
||||
|
||||
if ( index.isValid() && RiaGuiApplication::activeMainWindow() )
|
||||
if ( index.isValid() )
|
||||
{
|
||||
caf::PdmUiItem* uiItem = m_projectTreeView->uiItemFromModelIndex( index );
|
||||
|
||||
@ -383,8 +381,6 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiuDragDrop::dropMimeData( const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& dropTargetIndex )
|
||||
{
|
||||
CVF_ASSERT( RiaGuiApplication::activeMainWindow() );
|
||||
|
||||
caf::PdmUiTreeView* uiTreeView = m_projectTreeView;
|
||||
caf::PdmUiItem* dropTargetUiItem = uiTreeView->uiItemFromModelIndex( dropTargetIndex );
|
||||
caf::PdmObjectHandle* dropTarget = dynamic_cast<caf::PdmObjectHandle*>( dropTargetUiItem );
|
||||
|
Loading…
Reference in New Issue
Block a user