mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1113 Made tracer colors consistent, and son to be consistent with default well colors
This commit is contained in:
parent
8e4e7f098f
commit
b26bd11674
@ -26,6 +26,7 @@
|
||||
#include "RigFlowDiagResults.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
#include "RimEclipseWellCollection.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimFlowDiagSolution, "FlowDiagSolution");
|
||||
|
||||
@ -270,6 +271,31 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeSte
|
||||
return UNDEFINED;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimFlowDiagSolution::tracerColor(QString tracerName)
|
||||
{
|
||||
RimEclipseResultCase* eclCase;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
|
||||
if ( eclCase )
|
||||
{
|
||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
||||
|
||||
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
||||
{
|
||||
if ( wellResults[wIdx]->m_wellName == tracerName )
|
||||
{
|
||||
|
||||
return RimEclipseWellCollection::cycledPaletteColor(wIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return cvf::Color3f::DARK_GRAY;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
#include "cvfColor3.h"
|
||||
|
||||
class RimEclipseWell;
|
||||
class RigFlowDiagResults;
|
||||
@ -57,6 +58,7 @@ public:
|
||||
|
||||
TracerStatusType tracerStatusOverall(QString tracerName);
|
||||
TracerStatusType tracerStatusInTimeStep(QString tracerName, size_t timeStepIndex);
|
||||
cvf::Color3f tracerColor(QString tracerName);
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -239,8 +239,10 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
|
||||
RimWellFlowRateCurve* curve = new RimWellFlowRateCurve;
|
||||
curve->setFlowValues(tracerName, connNumbers, accFlow);
|
||||
curve->setColor( m_flowDiagSolution->tracerColor(tracerName));
|
||||
|
||||
plotTrack->addCurve(curve);
|
||||
|
||||
curve->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
@ -256,6 +258,7 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
|
||||
RimWellFlowRateCurve* curve = new RimWellFlowRateCurve;
|
||||
curve->setFlowValues("Total", connNumbers, accFlow);
|
||||
curve->setColor( cvf::Color3f::DARK_GRAY);
|
||||
|
||||
plotTrack->addCurve(curve);
|
||||
|
||||
|
@ -116,6 +116,8 @@ public:
|
||||
|
||||
const std::vector<cvf::ubyte>& resultWellGeometryVisibilities(size_t frameIndex);
|
||||
void scheduleIsWellPipesVisibleRecalculation();
|
||||
|
||||
static cvf::Color3f cycledPaletteColor(size_t colorIndex);
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
@ -128,7 +130,6 @@ protected:
|
||||
|
||||
private:
|
||||
void calculateWellGeometryVisibility(size_t frameIndex);
|
||||
static cvf::Color3f cycledPaletteColor(size_t colorIndex);
|
||||
void updateStateForVisibilityCheckboxes();
|
||||
void updateStateFromEnabledChildCount(size_t showLabelCount, caf::PdmField<caf::Tristate>* fieldToUpdate);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user