mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#950 Improved the updates, but there is still work to be done.
This commit is contained in:
parent
296dac48d3
commit
2c6e6f4a80
@ -310,8 +310,33 @@ void RimEclipseCase::updateFormationNamesData()
|
|||||||
std::vector<RimView*> views = this->views();
|
std::vector<RimView*> views = this->views();
|
||||||
for(RimView* view : views)
|
for(RimView* view : views)
|
||||||
{
|
{
|
||||||
if(view && view->isUsingFormationNames())
|
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(view);
|
||||||
|
|
||||||
|
if(eclView && eclView->isUsingFormationNames())
|
||||||
{
|
{
|
||||||
|
if (!activeFormationNames())
|
||||||
|
{
|
||||||
|
if (eclView->cellResult()->resultType() == RimDefines::FORMATION_NAMES)
|
||||||
|
{
|
||||||
|
eclView->cellResult()->setResultVariable(RimDefines::undefinedResultName());
|
||||||
|
}
|
||||||
|
|
||||||
|
RimEclipsePropertyFilterCollection* eclFilColl = eclView->eclipsePropertyFilterCollection();
|
||||||
|
for ( RimEclipsePropertyFilter* propFilter : eclFilColl->propertyFilters )
|
||||||
|
{
|
||||||
|
if ( propFilter->resultDefinition->resultType() == RimDefines::FORMATION_NAMES )
|
||||||
|
{
|
||||||
|
propFilter->resultDefinition()->setResultVariable(RimDefines::undefinedResultName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RimEclipsePropertyFilterCollection* eclFilColl = eclView->eclipsePropertyFilterCollection();
|
||||||
|
for ( RimEclipsePropertyFilter* propFilter : eclFilColl->propertyFilters )
|
||||||
|
{
|
||||||
|
if ( propFilter->resultDefinition->resultType() == RimDefines::FORMATION_NAMES ) propFilter->setToDefaultValues();
|
||||||
|
}
|
||||||
|
|
||||||
view->scheduleCreateDisplayModelAndRedraw();
|
view->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,7 +367,15 @@ void RimEclipseCase::computeCachedData()
|
|||||||
pInf.incrementProgress();
|
pInf.incrementProgress();
|
||||||
|
|
||||||
pInf.setProgressDescription("Calculating Formation Names Result");
|
pInf.setProgressDescription("Calculating Formation Names Result");
|
||||||
this->updateFormationNamesData();
|
if ( activeFormationNames() )
|
||||||
|
{
|
||||||
|
rigEclipseCase->setActiveFormationNames(activeFormationNames()->formationNamesData());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rigEclipseCase->setActiveFormationNames(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
pInf.incrementProgress();
|
pInf.incrementProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,24 @@ bool RimEclipsePropertyFilterCollection::hasActiveDynamicFilters() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimEclipsePropertyFilterCollection::isUsingFormationNames() const
|
||||||
|
{
|
||||||
|
if ( !isActive ) return false;
|
||||||
|
|
||||||
|
for ( size_t i = 0; i < propertyFilters.size(); i++ )
|
||||||
|
{
|
||||||
|
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
||||||
|
if ( propertyFilter->isActive()
|
||||||
|
&& propertyFilter->resultDefinition->resultType() == RimDefines::FORMATION_NAMES
|
||||||
|
&& propertyFilter->resultDefinition->resultVariable() != RimDefines::undefinedResultName()) return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
// Methods
|
// Methods
|
||||||
bool hasActiveFilters() const;
|
bool hasActiveFilters() const;
|
||||||
bool hasActiveDynamicFilters() const;
|
bool hasActiveDynamicFilters() const;
|
||||||
|
bool isUsingFormationNames() const;
|
||||||
|
|
||||||
void loadAndInitializePropertyFilters();
|
void loadAndInitializePropertyFilters();
|
||||||
|
|
||||||
|
@ -1700,7 +1700,9 @@ void RimEclipseView::axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::S
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipseView::isUsingFormationNames() const
|
bool RimEclipseView::isUsingFormationNames() const
|
||||||
{
|
{
|
||||||
return (cellResult()->resultType() == RimDefines::FORMATION_NAMES) ;
|
if ((cellResult()->resultType() == RimDefines::FORMATION_NAMES)) return true;
|
||||||
|
|
||||||
|
return eclipsePropertyFilterCollection()->isUsingFormationNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user