mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2721 Ensemble curves. Color ranges, cyclic color range assignment. Minor refactoring
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RifReaderEclipseSummary.h"
|
||||
|
||||
@@ -46,6 +47,14 @@
|
||||
#include "qwt_symbol.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Internal constants
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#define DOUBLE_INF std::numeric_limits<double>::infinity()
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
@@ -57,11 +66,6 @@ namespace caf
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Internal constants
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#define DOUBLE_INF std::numeric_limits<double>::infinity()
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEnsembleCurveSet, "RimEnsembleCurveSet");
|
||||
|
||||
@@ -208,6 +212,7 @@ void RimEnsembleCurveSet::loadDataAndUpdate(bool updateParentPlot)
|
||||
}
|
||||
}
|
||||
|
||||
m_legendConfig->initForEnsembleCurveSet(this);
|
||||
updateCurveColors();
|
||||
}
|
||||
|
||||
@@ -715,7 +720,7 @@ void RimEnsembleCurveSet::updateCurveColors()
|
||||
}
|
||||
else
|
||||
{
|
||||
curve->setColor(cvf::Color3f::GRAY);
|
||||
curve->setColor(RiaColorTables::undefinedCellColor());
|
||||
}
|
||||
curve->updateCurveAppearance();
|
||||
}
|
||||
@@ -751,7 +756,7 @@ void RimEnsembleCurveSet::updateCurveColors()
|
||||
rimCase->caseRealizationParameters()->parameterValue(parameterName).numericValue() :
|
||||
DOUBLE_INF;
|
||||
if(value != DOUBLE_INF) curve->setColor(cvf::Color3f(m_legendConfig->scalarMapper()->mapToColor(value)));
|
||||
else curve->setColor(cvf::Color3f::GRAY);
|
||||
else curve->setColor(RiaColorTables::undefinedCellColor());
|
||||
curve->updateCurveAppearance();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user