mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1445 Use correct colors in pie chart for well alloc plots in well flow mode
This commit is contained in:
parent
3fc0a59f06
commit
cd8ad75db5
@ -298,7 +298,7 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
if (m_flowDiagSolution)
|
if (m_flowDiagSolution)
|
||||||
color = m_flowDiagSolution->tracerColor(tracerVal.first);
|
color = m_flowDiagSolution->tracerColor(tracerVal.first);
|
||||||
else
|
else
|
||||||
color = cvf::Color3f::DARK_GRAY;
|
color = getTracerColor(tracerVal.first);
|
||||||
|
|
||||||
double tracerPercent = 100*tracerVal.second;
|
double tracerPercent = 100*tracerVal.second;
|
||||||
|
|
||||||
@ -394,13 +394,7 @@ void RimWellAllocationPlot::addStackedCurve(const QString& tracerName,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cvf::Color3f color = cvf::Color3f::DARK_GRAY;
|
curve->setColor(getTracerColor(tracerName));
|
||||||
|
|
||||||
if (tracerName == RIG_FLOW_OIL_NAME) color = cvf::Color3f::DARK_GREEN;
|
|
||||||
if (tracerName == RIG_FLOW_GAS_NAME) color = cvf::Color3f::DARK_RED;
|
|
||||||
if (tracerName == RIG_FLOW_WATER_NAME) color = cvf::Color3f::BLUE;
|
|
||||||
|
|
||||||
curve->setColor(color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plotTrack->addCurve(curve);
|
plotTrack->addCurve(curve);
|
||||||
@ -767,4 +761,15 @@ QWidget* RimWellAllocationPlot::createViewWidget(QWidget* mainWindowParent)
|
|||||||
return m_wellAllocationPlotWidget;
|
return m_wellAllocationPlotWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::Color3f RimWellAllocationPlot::getTracerColor(const QString& tracerName)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (tracerName == RIG_FLOW_OIL_NAME) return cvf::Color3f::DARK_GREEN;
|
||||||
|
if (tracerName == RIG_FLOW_GAS_NAME) return cvf::Color3f::DARK_RED;
|
||||||
|
if (tracerName == RIG_FLOW_WATER_NAME) return cvf::Color3f::BLUE;
|
||||||
|
return cvf::Color3f::DARK_GRAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,10 @@ class RiuWellAllocationPlot;
|
|||||||
class RimWellLogTrack;
|
class RimWellLogTrack;
|
||||||
class RigSingleWellResultsData;
|
class RigSingleWellResultsData;
|
||||||
|
|
||||||
|
namespace cvf {
|
||||||
|
class Color3f;
|
||||||
|
}
|
||||||
|
|
||||||
namespace caf {
|
namespace caf {
|
||||||
class PdmOptionItemInfo;
|
class PdmOptionItemInfo;
|
||||||
}
|
}
|
||||||
@ -111,6 +115,8 @@ private:
|
|||||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||||
virtual void deleteViewWidget() override;
|
virtual void deleteViewWidget() override;
|
||||||
|
|
||||||
|
cvf::Color3f getTracerColor(const QString& tracerName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showPlotTitle;
|
caf::PdmField<bool> m_showPlotTitle;
|
||||||
caf::PdmField<QString> m_userName;
|
caf::PdmField<QString> m_userName;
|
||||||
|
Loading…
Reference in New Issue
Block a user