mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8115 3D View : Add checkbox to GeoMech color result
This commit is contained in:
parent
736f3a45ed
commit
a5be5b6b61
@ -149,18 +149,23 @@ std::vector<RigEclipseResultAddress> RiaMemoryCleanup::selectedEclipseResults()
|
|||||||
std::set<RigFemResultAddress> RiaMemoryCleanup::findGeoMechCaseResultsInUse() const
|
std::set<RigFemResultAddress> RiaMemoryCleanup::findGeoMechCaseResultsInUse() const
|
||||||
{
|
{
|
||||||
std::set<RigFemResultAddress> resultsInUse;
|
std::set<RigFemResultAddress> resultsInUse;
|
||||||
RimGeoMechCase* geoMechCase = dynamic_cast<RimGeoMechCase*>( m_case() );
|
|
||||||
|
auto geoMechCase = dynamic_cast<RimGeoMechCase*>( m_case() );
|
||||||
if ( geoMechCase )
|
if ( geoMechCase )
|
||||||
{
|
{
|
||||||
std::vector<RimFemResultObserver*> geoMechResults;
|
std::vector<RimFemResultObserver*> geoMechResults;
|
||||||
geoMechCase->descendantsIncludingThisOfType( geoMechResults );
|
geoMechCase->descendantsIncludingThisOfType( geoMechResults );
|
||||||
for ( RimFemResultObserver* resultDef : geoMechResults )
|
for ( RimFemResultObserver* resultDef : geoMechResults )
|
||||||
{
|
{
|
||||||
caf::PdmField<bool>* field = dynamic_cast<caf::PdmField<bool>*>( resultDef->objectToggleField() );
|
auto pdmObj = dynamic_cast<caf::PdmObject*>( resultDef );
|
||||||
if ( !field || ( *field )() )
|
if ( pdmObj )
|
||||||
{
|
{
|
||||||
std::vector<RigFemResultAddress> required = resultDef->observedResults();
|
auto field = dynamic_cast<caf::PdmField<bool>*>( pdmObj->objectToggleField() );
|
||||||
resultsInUse.insert( required.begin(), required.end() );
|
if ( !field || ( *field )() )
|
||||||
|
{
|
||||||
|
std::vector<RigFemResultAddress> required = resultDef->observedResults();
|
||||||
|
resultsInUse.insert( required.begin(), required.end() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ add_library(
|
|||||||
RigFemResultAddress.h
|
RigFemResultAddress.h
|
||||||
RigFemResultPosEnum.h
|
RigFemResultPosEnum.h
|
||||||
RimFemResultObserver.h
|
RimFemResultObserver.h
|
||||||
RimFemResultObserver.cpp
|
|
||||||
RigHexGradientTools.h
|
RigHexGradientTools.h
|
||||||
RigHexGradientTools.cpp
|
RigHexGradientTools.cpp
|
||||||
RigFemPartResultCalculator.h
|
RigFemPartResultCalculator.h
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#include "RimFemResultObserver.h"
|
|
||||||
|
|
||||||
CAF_PDM_ABSTRACT_SOURCE_INIT( RimFemResultObserver, "RimFemResultObserver" );
|
|
@ -18,16 +18,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cafPdmObject.h"
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class RigFemResultAddress;
|
class RigFemResultAddress;
|
||||||
|
|
||||||
class RimFemResultObserver : public caf::PdmObject
|
class RimFemResultObserver
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual std::vector<RigFemResultAddress> observedResults() const = 0;
|
virtual std::vector<RigFemResultAddress> observedResults() const = 0;
|
||||||
};
|
};
|
||||||
|
@ -384,7 +384,7 @@ void RimGeoMechResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch
|
|||||||
|
|
||||||
if ( &m_resultVariableUiField == changedField || &m_compactionRefLayerUiField == changedField ||
|
if ( &m_resultVariableUiField == changedField || &m_compactionRefLayerUiField == changedField ||
|
||||||
&m_timeLapseBaseTimestep == changedField || &m_normalizeByHydrostaticPressure == changedField ||
|
&m_timeLapseBaseTimestep == changedField || &m_normalizeByHydrostaticPressure == changedField ||
|
||||||
&m_normalizationAirGap == changedField || &m_referenceTimeStep == changedField )
|
&m_normalizationAirGap == changedField || &m_referenceTimeStep == changedField || &m_isChecked == changedField )
|
||||||
{
|
{
|
||||||
QStringList fieldComponentNames = m_resultVariableUiField().split( QRegExp( "\\s+" ) );
|
QStringList fieldComponentNames = m_resultVariableUiField().split( QRegExp( "\\s+" ) );
|
||||||
if ( fieldComponentNames.size() > 0 )
|
if ( fieldComponentNames.size() > 0 )
|
||||||
@ -671,6 +671,8 @@ RigFemResultPosEnum RimGeoMechResultDefinition::resultPositionType() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimGeoMechResultDefinition::resultFieldName() const
|
QString RimGeoMechResultDefinition::resultFieldName() const
|
||||||
{
|
{
|
||||||
|
if ( !isChecked() ) return "";
|
||||||
|
|
||||||
return m_resultFieldName();
|
return m_resultFieldName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,8 +20,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "RigFemResultPosEnum.h"
|
#include "RimCheckableObject.h"
|
||||||
#include "RimFemResultObserver.h"
|
#include "RimFemResultObserver.h"
|
||||||
|
|
||||||
|
#include "RigFemResultPosEnum.h"
|
||||||
|
|
||||||
#include "cafAppEnum.h"
|
#include "cafAppEnum.h"
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
@ -38,7 +41,7 @@ class RimRegularLegendConfig;
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class RimGeoMechResultDefinition : public RimFemResultObserver
|
class RimGeoMechResultDefinition : public RimFemResultObserver, public RimCheckableObject
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class RimRegularLegendConfig;
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class RimTensorResults : public RimFemResultObserver
|
class RimTensorResults : public RimFemResultObserver, public caf::PdmObject
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user