mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1981 RFT Plot. Disabled several commands
This commit is contained in:
@@ -46,6 +46,7 @@ CAF_CMD_SOURCE_INIT(RicExportToLasFileFeature, "RicExportToLasFileFeature");
|
||||
bool RicExportToLasFileFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
|
||||
return RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves().size() > 0;
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiItem.h"
|
||||
@@ -119,7 +120,9 @@ bool RicCopyReferencesToClipboardFeature::isAnyCopyableObjectSelected()
|
||||
bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(caf::PdmObject* pdmObject)
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocPlot = nullptr;
|
||||
RimWellRftPlot* rftPlot = nullptr;
|
||||
pdmObject->firstAncestorOrThisOfType(wellAllocPlot);
|
||||
pdmObject->firstAncestorOrThisOfType(rftPlot);
|
||||
|
||||
if (dynamic_cast<RimGeoMechView*>(pdmObject))
|
||||
{
|
||||
@@ -139,7 +142,7 @@ bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(caf::PdmObject
|
||||
}
|
||||
else if (dynamic_cast<RimPlotCurve*>(pdmObject))
|
||||
{
|
||||
return true;
|
||||
if(!rftPlot) return true;
|
||||
}
|
||||
else if (dynamic_cast<RimSummaryCurveFilter*>(pdmObject))
|
||||
{
|
||||
@@ -147,11 +150,11 @@ bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(caf::PdmObject
|
||||
}
|
||||
else if (dynamic_cast<RimWellLogTrack*>(pdmObject))
|
||||
{
|
||||
if (!wellAllocPlot) return true;
|
||||
if (!wellAllocPlot && !rftPlot) return true;
|
||||
}
|
||||
else if (dynamic_cast<RimWellLogPlot*>(pdmObject))
|
||||
{
|
||||
if (!wellAllocPlot) return true;
|
||||
if (!wellAllocPlot && !rftPlot) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -47,6 +47,8 @@
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimFlowCharacteristicsPlot.h"
|
||||
#include "RimAsciiDataCurve.h"
|
||||
#include "RimWellLogRftCurve.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
#include "RimEllipseFractureTemplate.h"
|
||||
@@ -80,9 +82,11 @@ bool isDeletable(caf::PdmUiItem* uiItem)
|
||||
if (destinationObject)
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = nullptr;
|
||||
RimWellRftPlot* rftPlot = nullptr;
|
||||
destinationObject->firstAncestorOrThisOfType(wellAllocationPlot);
|
||||
destinationObject->firstAncestorOrThisOfType(rftPlot);
|
||||
|
||||
if (wellAllocationPlot)
|
||||
if (wellAllocationPlot || rftPlot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -38,6 +38,7 @@ CAF_CMD_SOURCE_INIT(RicChangeDataSourceFeature, "RicChangeDataSourceFeature");
|
||||
bool RicChangeDataSourceFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
|
||||
std::vector<RimWellLogExtractionCurve*> extrCurves = extractionCurves();
|
||||
|
||||
|
@@ -54,6 +54,7 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogCurveExtractionFeature, "RicNewWellLogCurveExtr
|
||||
bool RicNewWellLogCurveExtractionFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
int branchIndex;
|
||||
return (RicWellLogTools::selectedWellLogPlotTrack() != nullptr || RicWellLogTools::selectedWellPath() != nullptr || RicWellLogTools::selectedSimulationWell(&branchIndex) != nullptr) && caseAvailable();
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogFileCurveFeature, "RicNewWellLogFileCurveFeatur
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellLogFileCurveFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
return (RicWellLogTools::selectedWellLogPlotTrack() != nullptr && wellLogFilesAvailable()) || RicWellLogTools::selectedWellPathWithLogFile() != nullptr;
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,11 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogPlotTrackFeature, "RicNewWellLogPlotTrackFeatur
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellLogPlotTrackFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ||
|
||||
RicWellLogPlotCurveFeatureImpl::parentWellRftPlot())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return selectedWellLogPlot() != NULL;
|
||||
}
|
||||
|
@@ -47,6 +47,7 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogRftCurveFeature, "RicNewWellLogRftCurveFeature"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellLogRftCurveFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
if (RicWellLogTools::selectedWellLogPlotTrack() != nullptr)
|
||||
{
|
||||
return true;
|
||||
|
@@ -43,6 +43,7 @@ CAF_CMD_SOURCE_INIT(RicPasteWellLogCurveFeature, "RicPasteWellLogCurveFeature");
|
||||
bool RicPasteWellLogCurveFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(caf::SelectionManager::instance()->selectedItem());
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
#include "cafPdmObjectGroup.h"
|
||||
#include "cafPdmObjectHandle.h"
|
||||
@@ -45,8 +46,10 @@ bool RicPasteWellLogTrackFeature::isCommandEnabled()
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(caf::SelectionManager::instance()->selectedItem());
|
||||
|
||||
RimWellLogPlot* wellLogPlot = nullptr;
|
||||
RimWellRftPlot* rftPlot = nullptr;
|
||||
destinationObject->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (!wellLogPlot)
|
||||
destinationObject->firstAncestorOrThisOfType(rftPlot);
|
||||
if (!wellLogPlot || rftPlot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user