mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-14 01:13:52 -06:00
set eclipsecase in initafterread
This commit is contained in:
parent
2a1d8379a5
commit
54f97d6409
@ -44,7 +44,10 @@ RimPlotCellFilter::RimPlotCellFilter()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCellFilter::updateCellVisibility(size_t timeStepIndex, cvf::UByteArray* cellVisibility)
|
||||
{
|
||||
updateCellVisibilityFromFilter(timeStepIndex, cellVisibility);
|
||||
if (isChecked())
|
||||
{
|
||||
updateCellVisibilityFromFilter(timeStepIndex, cellVisibility);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -18,6 +18,9 @@
|
||||
|
||||
#include "RimPlotCellFilterCollection.h"
|
||||
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimPlotCellFilterCollection, "RimPlotCellFilterCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -40,7 +43,7 @@ void RimPlotCellFilterCollection::addCellFilter(RimPlotCellFilter* cellFilter)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimPlotCellFilterCollection::cellFilterCount() const
|
||||
{
|
||||
@ -48,11 +51,32 @@ size_t RimPlotCellFilterCollection::cellFilterCount() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCellFilterCollection::computeCellVisibilityFromFilter(size_t timeStepIndex, cvf::UByteArray* cellVisibility)
|
||||
{
|
||||
updateCellVisibilityFromFilter(timeStepIndex, cellVisibility);
|
||||
if (isChecked())
|
||||
{
|
||||
updateCellVisibilityFromFilter(timeStepIndex, cellVisibility);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCellFilterCollection::setCase(RimCase* gridCase)
|
||||
{
|
||||
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>(gridCase);
|
||||
if (eclipseResultCase)
|
||||
{
|
||||
std::vector<RimEclipseResultDefinition*> resultDefinitions;
|
||||
|
||||
this->descendantsIncludingThisOfType(resultDefinitions);
|
||||
for (auto r : resultDefinitions)
|
||||
{
|
||||
r->setEclipseCase(eclipseResultCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -62,7 +86,9 @@ void RimPlotCellFilterCollection::updateCellVisibilityFromFilter(size_t timeStep
|
||||
{
|
||||
for (RimPlotCellFilter* f : m_cellFilters())
|
||||
{
|
||||
f->updateCellVisibility(timeStepIndex, cellVisibility);
|
||||
if (f->isChecked())
|
||||
{
|
||||
f->updateCellVisibility(timeStepIndex, cellVisibility);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
class RimCase;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@ -37,6 +39,8 @@ public:
|
||||
|
||||
void computeCellVisibilityFromFilter(size_t timeStepIndex, cvf::UByteArray* cellVisibility);
|
||||
|
||||
void setCase(RimCase* gridCase);
|
||||
|
||||
protected:
|
||||
void updateCellVisibilityFromFilter(size_t timeStepIndex, cvf::UByteArray* cellVisibility) override;
|
||||
|
||||
|
@ -368,6 +368,7 @@ void RimGridCrossPlotCurveSet::initAfterRead()
|
||||
m_xAxisProperty->setEclipseCase(eclipseCase);
|
||||
m_yAxisProperty->setEclipseCase(eclipseCase);
|
||||
m_groupingProperty->setEclipseCase(eclipseCase);
|
||||
m_plotCellFilterCollection->setCase(eclipseCase);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user