mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor: extract code for detecting logarithmic result
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RimEclipseCellColors.h"
|
||||
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RicfCommandObject.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
@@ -184,19 +186,7 @@ RimRegularLegendConfig* RimEclipseCellColors::createLegendForResult( const QStri
|
||||
bool useDiscreteLogLevels,
|
||||
bool isCategoryResult )
|
||||
{
|
||||
bool useLog = false;
|
||||
{
|
||||
QStringList subStringsToMatch{ "TRAN", "MULT", "PERM" };
|
||||
|
||||
for ( const auto& s : subStringsToMatch )
|
||||
{
|
||||
if ( resultName.contains( s, Qt::CaseInsensitive ) )
|
||||
{
|
||||
useLog = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool useLog = RiaResultNames::isLogarithmicResult( resultName );
|
||||
|
||||
RimRegularLegendConfig::ColorRangesType colorRangeType = RimRegularLegendConfig::ColorRangesType::UNDEFINED;
|
||||
if ( isCategoryResult )
|
||||
|
||||
Reference in New Issue
Block a user