mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
work in progress
This commit is contained in:
parent
4e1994d779
commit
a3f9dd863e
@ -147,6 +147,13 @@ double RimStatisticsContourMapProjection::sampleSpacing() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStatisticsContourMapProjection::clearGridMappingAndRedraw()
|
||||
{
|
||||
clearGridMapping();
|
||||
updateConnectedEditors();
|
||||
generateResultsIfNecessary( view()->currentTimeStep() );
|
||||
updateLegend();
|
||||
|
||||
RimEclipseView* parentView = firstAncestorOrThisOfTypeAsserted<RimEclipseView>();
|
||||
parentView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -260,10 +267,15 @@ std::pair<double, double> RimStatisticsContourMapProjection::minmaxValuesAllTime
|
||||
{
|
||||
clearTimeStepRange();
|
||||
|
||||
// TODO - step through all time steps here!
|
||||
std::vector<double> aggregatedResults = statisticsContourMap()->result( 0, m_statisticsType() );
|
||||
m_minResultAllTimeSteps = RigContourMapProjection::minValue( aggregatedResults );
|
||||
m_maxResultAllTimeSteps = RigContourMapProjection::maxValue( aggregatedResults );
|
||||
if ( auto map = statisticsContourMap() )
|
||||
{
|
||||
for ( auto ts : map->selectedTimeSteps() )
|
||||
{
|
||||
std::vector<double> aggregatedResults = statisticsContourMap()->result( ts, m_statisticsType() );
|
||||
m_minResultAllTimeSteps = std::min( m_minResultAllTimeSteps, RigContourMapProjection::minValue( aggregatedResults ) );
|
||||
m_maxResultAllTimeSteps = std::max( m_maxResultAllTimeSteps, RigContourMapProjection::maxValue( aggregatedResults ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return std::make_pair( m_minResultAllTimeSteps, m_maxResultAllTimeSteps );
|
||||
@ -303,3 +315,20 @@ QString RimStatisticsContourMapProjection::resultAggregationText() const
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStatisticsContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_statisticsType )
|
||||
{
|
||||
clearGridMappingAndRedraw();
|
||||
}
|
||||
else
|
||||
{
|
||||
RimContourMapProjection::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ protected:
|
||||
protected:
|
||||
// Framework overrides
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
protected:
|
||||
caf::PdmField<caf::AppEnum<RimStatisticsContourMap::StatisticsType>> m_statisticsType;
|
||||
|
Loading…
Reference in New Issue
Block a user