mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove confusing UI elements
- hide selection of data source, set either summary or ensemble based on curve used as source - only show available statistics curves
This commit is contained in:
@@ -2422,6 +2422,14 @@ bool RimEnsembleCurveSet::hasMeanData() const
|
||||
return m_ensembleStatCaseY->hasMeanData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimEnsembleStatistics* RimEnsembleCurveSet::statisticsOptions() const
|
||||
{
|
||||
return m_statistics();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -176,6 +176,8 @@ public:
|
||||
bool hasP90Data() const override;
|
||||
bool hasMeanData() const override;
|
||||
|
||||
const RimEnsembleStatistics* statisticsOptions() const;
|
||||
|
||||
void appendColorGroup( caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
static void appendOptionItemsForSummaryAddresses( QList<caf::PdmOptionItemInfo>* options, RimSummaryCaseCollection* summaryCaseGroup );
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimEnsembleCurveSetCollection.h"
|
||||
#include "RimEnsembleStatistics.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimTimeAxisAnnotation.h"
|
||||
@@ -457,8 +458,6 @@ void RimSummaryRegressionAnalysisCurve::defineUiOrdering( QString uiConfigName,
|
||||
{
|
||||
RimPlotCurve::updateFieldUiState();
|
||||
|
||||
uiOrdering.add( &m_dataSourceForRegression );
|
||||
|
||||
if ( m_dataSourceForRegression() == DataSource::ENSEMBLE )
|
||||
{
|
||||
uiOrdering.add( &m_ensembleCurveSet );
|
||||
@@ -655,6 +654,44 @@ QList<caf::PdmOptionItemInfo> RimSummaryRegressionAnalysisCurve::calculateValueO
|
||||
return options;
|
||||
}
|
||||
|
||||
if ( fieldNeedingOptions == &m_ensembleStatisticsType )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
options.append( { "None", nullptr } );
|
||||
|
||||
if ( m_ensembleCurveSet() )
|
||||
{
|
||||
auto statisticsOptions = m_ensembleCurveSet()->statisticsOptions();
|
||||
|
||||
std::vector<RifEclipseSummaryAddressDefines::StatisticsType> availableStatistics;
|
||||
if ( statisticsOptions->showP10Curve() )
|
||||
{
|
||||
availableStatistics.push_back( RifEclipseSummaryAddressDefines::StatisticsType::P10 );
|
||||
}
|
||||
if ( statisticsOptions->showP50Curve() )
|
||||
{
|
||||
availableStatistics.push_back( RifEclipseSummaryAddressDefines::StatisticsType::P50 );
|
||||
}
|
||||
if ( statisticsOptions->showP90Curve() )
|
||||
{
|
||||
availableStatistics.push_back( RifEclipseSummaryAddressDefines::StatisticsType::P90 );
|
||||
}
|
||||
if ( statisticsOptions->showMeanCurve() )
|
||||
{
|
||||
availableStatistics.push_back( RifEclipseSummaryAddressDefines::StatisticsType::MEAN );
|
||||
}
|
||||
|
||||
for ( const auto& statisticsType : availableStatistics )
|
||||
{
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddressDefines::StatisticsType>::uiText( statisticsType ),
|
||||
statisticsType ) );
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
return RimSummaryCurve::calculateValueOptions( fieldNeedingOptions );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user