#1190 Disabled drrop of items into well allocation objects

This commit is contained in:
Magne Sjaastad 2017-02-07 09:39:40 +01:00
parent 4313409c57
commit 7652009fe7

View File

@ -29,11 +29,11 @@
#include "RimEclipseResultCase.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimMimeData.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogTrack.h"
#include "RimWellAllocationPlot.h"
#include "RimWellLogCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RimWellLogTrack.h"
#include "RiuMainWindow.h"
@ -147,6 +147,14 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const
caf::PdmUiTreeView* uiTreeView = RiuMainWindow::instance()->projectTreeView();
caf::PdmUiItem* uiItem = uiTreeView->uiItemFromModelIndex(index);
caf::PdmObject* pdmObj = dynamic_cast<caf::PdmObject*>(uiItem);
if (pdmObj)
{
RimWellAllocationPlot* wellAllocationPlot = nullptr;
pdmObj->firstAncestorOrThisOfType(wellAllocationPlot);
if (wellAllocationPlot) return itemflags;
}
if (dynamic_cast<RimEclipseCase*>(uiItem) ||
dynamic_cast<RimWellLogCurve*>(uiItem) ||
dynamic_cast<RimWellLogFileChannel*>(uiItem) ||