mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add result type and create and use custom legend if possible
* Update submodule * Use postfix functions and add custom color legend * Add type to RigEclipseResultAddress Read types from ROFF and create default legend based on type or custom created legend. * Use caseId to connect legend configuration to result in a case
This commit is contained in:
@@ -142,7 +142,11 @@ void RimEclipseCellColors::changeLegendConfig( QString resultVarNameOfNewLegend
|
||||
|
||||
if ( !found )
|
||||
{
|
||||
auto newLegend = createLegendForResult( resultVarNameOfNewLegend, this->m_useDiscreteLogLevels, this->hasCategoryResult() );
|
||||
int caseId = 0;
|
||||
if ( eclipseCase() ) caseId = eclipseCase()->caseId();
|
||||
|
||||
auto newLegend =
|
||||
createLegendForResult( caseId, resultVarNameOfNewLegend, this->m_useDiscreteLogLevels, this->hasCategoryResult() );
|
||||
|
||||
newLegend->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
||||
|
||||
@@ -165,12 +169,13 @@ void RimEclipseCellColors::onLegendConfigChanged( const caf::SignalEmitter* emit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimRegularLegendConfig* RimEclipseCellColors::createLegendForResult( const QString& resultName, bool useDiscreteLogLevels, bool isCategoryResult )
|
||||
RimRegularLegendConfig*
|
||||
RimEclipseCellColors::createLegendForResult( int caseId, const QString& resultName, bool useDiscreteLogLevels, bool isCategoryResult )
|
||||
{
|
||||
auto* newLegend = new RimRegularLegendConfig;
|
||||
newLegend->resultVariableName = resultName;
|
||||
|
||||
newLegend->setDefaultConfigForResultName( resultName, useDiscreteLogLevels, isCategoryResult );
|
||||
newLegend->setDefaultConfigForResultName( caseId, resultName, useDiscreteLogLevels, isCategoryResult );
|
||||
|
||||
return newLegend;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user