mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#707) Fixed regression regarding well pipe and well cells
Introduced in707e8c6
and not quite fixed in179f0c9
This commit is contained in:
@@ -1095,7 +1095,7 @@ void RimEclipseView::syncronizeWellsWithResults()
|
||||
for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
|
||||
{
|
||||
RimEclipseWell* well = this->wellCollection()->wells()[wIdx];
|
||||
well->setWellResults(NULL);
|
||||
well->setWellResults(NULL, -1);
|
||||
}
|
||||
|
||||
// Find corresponding well from well result, or create a new
|
||||
@@ -1111,7 +1111,7 @@ void RimEclipseView::syncronizeWellsWithResults()
|
||||
}
|
||||
newWells.push_back(well);
|
||||
|
||||
well->setWellResults(wellResults[wIdx].p());
|
||||
well->setWellResults(wellResults[wIdx].p(), wIdx);
|
||||
}
|
||||
|
||||
// Delete all wells that does not have a result
|
||||
@@ -1139,13 +1139,6 @@ void RimEclipseView::syncronizeWellsWithResults()
|
||||
}
|
||||
|
||||
this->wellCollection()->sortWellsByName();
|
||||
|
||||
for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
|
||||
{
|
||||
this->wellCollection()->wells()[wIdx]->setWellIndex(wIdx);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -50,7 +50,7 @@ RimEclipseWell::RimEclipseWell()
|
||||
name.uiCapability()->setUiHidden(true);
|
||||
name.uiCapability()->setUiReadOnly(true);
|
||||
|
||||
m_wellIndex = cvf::UNDEFINED_SIZE_T;
|
||||
m_resultWellIndex = cvf::UNDEFINED_SIZE_T;
|
||||
|
||||
m_reservoirView = NULL;
|
||||
}
|
||||
@@ -254,9 +254,17 @@ void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseWell::isWellPipeVisible(size_t frameIndex)
|
||||
{
|
||||
CVF_ASSERT(m_wellIndex != cvf::UNDEFINED_SIZE_T);
|
||||
CVF_ASSERT(m_resultWellIndex != cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
// Return the possibly cached value
|
||||
return m_reservoirView->wellCollection()->isWellPipesVisible(frameIndex)[m_wellIndex];
|
||||
return m_reservoirView->wellCollection()->isWellPipesVisible(frameIndex)[m_resultWellIndex];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseWell::setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex)
|
||||
{
|
||||
m_wellResults = wellResults; m_resultWellIndex = resultWellIndex;
|
||||
}
|
||||
|
||||
|
@@ -47,10 +47,10 @@ public:
|
||||
virtual ~RimEclipseWell();
|
||||
|
||||
void setReservoirView(RimEclipseView* ownerReservoirView);
|
||||
void setWellIndex(size_t val) { m_wellIndex = val; }
|
||||
|
||||
void setWellResults(RigSingleWellResultsData* wellResults) { m_wellResults = wellResults;}
|
||||
void setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex);
|
||||
RigSingleWellResultsData* wellResults() { return m_wellResults.p(); }
|
||||
size_t resultWellIndex() { return m_resultWellIndex; }
|
||||
|
||||
bool isWellPipeVisible(size_t frameIndex);
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
|
||||
private:
|
||||
cvf::ref<RigSingleWellResultsData> m_wellResults;
|
||||
size_t m_wellIndex;
|
||||
size_t m_resultWellIndex;
|
||||
|
||||
RimEclipseView* m_reservoirView;
|
||||
};
|
||||
|
@@ -330,7 +330,7 @@ void RimEclipseWellCollection::calculateIsWellPipesVisible(size_t frameIndex)
|
||||
|
||||
for (size_t i = 0; i < wells().size(); ++i)
|
||||
{
|
||||
m_isWellPipesVisible[frameIndex][i] = wells[i]->calculateWellPipeVisibility(frameIndex);
|
||||
m_isWellPipesVisible[frameIndex][wells[i]->resultWellIndex()] = wells[i]->calculateWellPipeVisibility(frameIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user