#1190 Do not show delete features for well allocation plot objects

This commit is contained in:
Magne Sjaastad
2017-02-09 08:34:28 +01:00
parent 9753e8b242
commit 6e901cdb12
2 changed files with 18 additions and 1 deletions

View File

@@ -36,6 +36,7 @@
#include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h"
#include "RimViewController.h"
#include "RimWellAllocationPlot.h"
#include "RimWellFlowRateCurve.h"
#include "RimWellLogCurve.h"
#include "RimWellLogPlot.h"
@@ -56,7 +57,17 @@ namespace caf
bool isDeletable(PdmUiItem * uiItem)
{
if (dynamic_cast<RimWellFlowRateCurve*>(uiItem)) return false;
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(uiItem);
if (destinationObject)
{
RimWellAllocationPlot* wellAllocationPlot = nullptr;
destinationObject->firstAncestorOrThisOfType(wellAllocationPlot);
if (wellAllocationPlot)
{
return false;
}
}
if (dynamic_cast<RimGeoMechView*>(uiItem)) return true;
if (dynamic_cast<RimEclipseView*>(uiItem)) return true;