mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5279 Formations : Add const and simplify access
This commit is contained in:
@@ -1001,15 +1001,11 @@ void RimGridCrossPlotDataSet::updateLegendRange()
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case() );
|
||||
if ( eclipseCase )
|
||||
{
|
||||
RigFormationNames* formationNames = eclipseCase->eclipseCaseData()->activeFormationNames();
|
||||
if ( formationNames )
|
||||
const std::vector<QString> categoryNames = eclipseCase->eclipseCaseData()->formationNames();
|
||||
if ( !categoryNames.empty() )
|
||||
{
|
||||
const std::vector<QString>& categoryNames = formationNames->formationNames();
|
||||
if ( !categoryNames.empty() )
|
||||
{
|
||||
legendConfig()->setNamedCategoriesInverse( categoryNames );
|
||||
legendConfig()->setAutomaticRanges( 0, categoryNames.size() - 1, 0, categoryNames.size() - 1 );
|
||||
}
|
||||
legendConfig()->setNamedCategoriesInverse( categoryNames );
|
||||
legendConfig()->setAutomaticRanges( 0, categoryNames.size() - 1, 0, categoryNames.size() - 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user