mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1078 Added possibility to show/hide connection status colors
This commit is contained in:
@@ -250,25 +250,39 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
part->setDrawable(geo1.p());
|
||||
|
||||
cvf::Color4f headColor(cvf::Color3::GRAY);
|
||||
if (wellResultFrame.m_isOpen)
|
||||
|
||||
RimEclipseWellCollection* wellColl = nullptr;
|
||||
if (m_rimWell)
|
||||
{
|
||||
if (wellResultFrame.m_productionType == RigWellResultFrame::PRODUCER)
|
||||
m_rimWell->firstAncestorOrThisOfType(wellColl);
|
||||
}
|
||||
|
||||
if (wellColl && wellColl->showConnectionStatusColors())
|
||||
{
|
||||
if (wellResultFrame.m_isOpen)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::GREEN);
|
||||
}
|
||||
else if (wellResultFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::ORANGE);
|
||||
}
|
||||
else if (wellResultFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::RED);
|
||||
}
|
||||
else if (wellResultFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::BLUE);
|
||||
if (wellResultFrame.m_productionType == RigWellResultFrame::PRODUCER)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::GREEN);
|
||||
}
|
||||
else if (wellResultFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::ORANGE);
|
||||
}
|
||||
else if (wellResultFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::RED);
|
||||
}
|
||||
else if (wellResultFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR)
|
||||
{
|
||||
headColor = cvf::Color4f(cvf::Color3::BLUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
headColor = cvf::Color4f(m_rimWell->wellPipeColor());
|
||||
}
|
||||
|
||||
caf::SurfaceEffectGenerator surfaceGen(headColor, caf::PO_1);
|
||||
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();
|
||||
|
||||
Reference in New Issue
Block a user