mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3741 Make it possible to enable/disable all well path components in plots and 3d view.
* Add check box to casing design and update of plot * Add isEnabled() method to component interface which controls plotting.
This commit is contained in:
@@ -632,6 +632,17 @@ cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords() const
|
||||
return bb;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFishbonesMultipleSubs::isEnabled() const
|
||||
{
|
||||
RimFishbonesCollection* collection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
|
||||
return collection->isChecked() && isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -110,6 +110,7 @@ public:
|
||||
cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||
|
||||
// Overrides from RimWellPathCompletionsInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RivWellFracturePartMgr.h"
|
||||
|
||||
@@ -286,6 +287,16 @@ void RimFracture::clearCachedNonDarcyProperties()
|
||||
m_cachedFractureProperties = NonDarcyData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFracture::isEnabled() const
|
||||
{
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(fractureCollection);
|
||||
return fractureCollection->isChecked() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
friend class RimFractureTemplate;
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathValve.h"
|
||||
@@ -232,6 +233,16 @@ std::vector<RimWellPathValve*> RimPerforationInterval::valves() const
|
||||
return allValves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPerforationInterval::isEnabled() const
|
||||
{
|
||||
RimPerforationCollection* perforationCollection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(perforationCollection);
|
||||
return perforationCollection->isChecked() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
std::vector<RimWellPathValve*> valves() const;
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
class RimWellPathComponentInterface
|
||||
{
|
||||
public:
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||
virtual QString componentLabel() const = 0;
|
||||
virtual QString componentTypeLabel() const = 0;
|
||||
|
||||
@@ -103,6 +103,16 @@ std::vector<double> RimWellPathValve::valveLocations() const
|
||||
return valveDepths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathValve::isEnabled() const
|
||||
{
|
||||
RimPerforationInterval* perforationInterval = nullptr;
|
||||
this->firstAncestorOrThisOfType(perforationInterval);
|
||||
return perforationInterval->isEnabled() && isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
std::vector<double> valveLocations() const;
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
bool isEnabled() const override;
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
Reference in New Issue
Block a user