#2883, #2890 Fix color assignment and stability for ensemble curve sets

This commit is contained in:
Jacob Støren
2018-05-11 08:01:10 +02:00
parent 6270dd3bc9
commit bb033eb561
12 changed files with 41 additions and 73 deletions

View File

@@ -35,19 +35,19 @@ class RimEnsembleCurveSetCollection;
class RimEnsembleCurveSetColorManager
{
public:
static const std::map<RimRegularLegendConfig::ColorRangesType, cvf::Color3ubArray> ENSEMBLE_COLOR_RANGES;
static const std::map<RimRegularLegendConfig::ColorRangesType, cvf::Color3ubArray> EnsembleColorRanges;
static const RimRegularLegendConfig::ColorRangesType DEFAULT_ENSEMBLE_COLOR_RANGE;
static RimRegularLegendConfig::ColorRangesType cycledEnsembleColorRange(int index);
static bool isEnsembleColorRange(RimRegularLegendConfig::ColorRangesType colorRange)
{
return ENSEMBLE_COLOR_RANGES.find(colorRange) != ENSEMBLE_COLOR_RANGES.end();
return EnsembleColorRanges.find(colorRange) != EnsembleColorRanges.end();
}
static RimRegularLegendConfig::ColorRangesType nextColorRange(RimEnsembleCurveSet* curveSet);
private:
static RimRegularLegendConfig::ColorRangesType colorRangeByIndex(int index);
static std::map<RimEnsembleCurveSetCollection*, int> m_nextColorIndexes;
static std::map<RimEnsembleCurveSetCollection*, std::map<RimEnsembleCurveSet*, RimRegularLegendConfig::ColorRangesType>> m_colorCache;