mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2689 Ensemble curves. Adapt legend range settings to curve set
This commit is contained in:
parent
6c45725b19
commit
27ba7c5d9d
@ -777,11 +777,16 @@ void RimRegularLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
|
||||
QList<caf::PdmOptionItemInfo> RimRegularLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
bool hasStimPlanParent = false;
|
||||
bool hasEnsembleCurveSetParent = false;
|
||||
|
||||
RimStimPlanColors* stimPlanColors = nullptr;
|
||||
this->firstAncestorOrThisOfType(stimPlanColors);
|
||||
if (stimPlanColors) hasStimPlanParent = true;
|
||||
|
||||
RimEnsembleCurveSet* ensembleCurveSet = nullptr;
|
||||
this->firstAncestorOrThisOfType(ensembleCurveSet);
|
||||
if (ensembleCurveSet) hasEnsembleCurveSetParent = true;
|
||||
|
||||
bool isCategoryResult = false;
|
||||
{
|
||||
RimEclipseCellColors* eclCellColors = nullptr;
|
||||
@ -849,9 +854,13 @@ QList<caf::PdmOptionItemInfo> RimRegularLegendConfig::calculateValueOptions(cons
|
||||
{
|
||||
if (!m_isAllTimeStepsRangeDisabled)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS), RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS));
|
||||
QString uiText;
|
||||
if(!hasEnsembleCurveSetParent) uiText = RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS);
|
||||
else uiText = "Auto Range";
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo(uiText, RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS));
|
||||
}
|
||||
if (!hasStimPlanParent)
|
||||
if (!hasStimPlanParent && !hasEnsembleCurveSetParent)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user