mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1190 Do not show delete features for well allocation plot objects
This commit is contained in:
parent
9753e8b242
commit
6e901cdb12
@ -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;
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "RicDeleteWellLogPlotTrackFeature.h"
|
||||
|
||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
@ -34,6 +36,8 @@ CAF_CMD_SOURCE_INIT(RicDeleteWellLogPlotTrackFeature, "RicDeleteWellLogPlotTrack
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
|
||||
std::vector<RimWellLogTrack*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
|
||||
@ -55,6 +59,8 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return;
|
||||
|
||||
std::vector<RimWellLogTrack*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user