From d4ec42e9a29fa1bb9eaaeb599e4de2a0b9d274cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Sun, 10 Jan 2016 21:31:54 +0100 Subject: [PATCH] (#712) Made a possible well cell connection in the wellhead control the connection color of the well pipe. --- .../RigSingleWellResultsData.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp index 3b178eb0cb..b3af8e7f06 100644 --- a/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigSingleWellResultsData.cpp @@ -283,11 +283,6 @@ const RigWellResultPoint* RigWellResultFrame::findResultCell(size_t gridIndex, s { CVF_ASSERT(gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T); - if (m_wellHead.m_gridCellIndex == gridCellIndex && m_wellHead.m_gridIndex == gridIndex ) - { - return &m_wellHead; - } - for (size_t wb = 0; wb < m_wellResultBranches.size(); ++wb) { for (size_t wc = 0; wc < m_wellResultBranches[wb].m_branchResultPoints.size(); ++wc) @@ -300,5 +295,14 @@ const RigWellResultPoint* RigWellResultFrame::findResultCell(size_t gridIndex, s } } + // If we could not find the cell among the real connections, we try the wellhead. + // The wellhead does however not have a real connection state, and is thereby always rendered as closed + // If we have a real connection in the wellhead, we should not end here. See Github issue #712 + + if (m_wellHead.m_gridCellIndex == gridCellIndex && m_wellHead.m_gridIndex == gridIndex ) + { + return &m_wellHead; + } + return NULL; }