mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1078 Assign default colors when a new well is created
This commit is contained in:
parent
62f73260fc
commit
9aa98a3895
@ -868,8 +868,6 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas
|
|||||||
|
|
||||||
riv->loadDataAndUpdate();
|
riv->loadDataAndUpdate();
|
||||||
|
|
||||||
riv->wellCollection()->assignDefaultWellColors();
|
|
||||||
|
|
||||||
// Add a corresponding summary case if it exists
|
// Add a corresponding summary case if it exists
|
||||||
{
|
{
|
||||||
RimSummaryCaseCollection* sumCaseColl = m_project->activeOilField() ? m_project->activeOilField()->summaryCaseCollection() : NULL;
|
RimSummaryCaseCollection* sumCaseColl = m_project->activeOilField() ? m_project->activeOilField()->summaryCaseCollection() : NULL;
|
||||||
|
@ -1089,6 +1089,8 @@ void RimEclipseView::syncronizeWellsWithResults()
|
|||||||
well->setWellResults(NULL, -1);
|
well->setWellResults(NULL, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isAnyWellCreated = false;
|
||||||
|
|
||||||
// Find corresponding well from well result, or create a new
|
// Find corresponding well from well result, or create a new
|
||||||
|
|
||||||
for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx)
|
for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx)
|
||||||
@ -1099,6 +1101,8 @@ void RimEclipseView::syncronizeWellsWithResults()
|
|||||||
{
|
{
|
||||||
well = new RimEclipseWell;
|
well = new RimEclipseWell;
|
||||||
well->name = wellResults[wIdx]->m_wellName;
|
well->name = wellResults[wIdx]->m_wellName;
|
||||||
|
|
||||||
|
isAnyWellCreated = true;
|
||||||
}
|
}
|
||||||
newWells.push_back(well);
|
newWells.push_back(well);
|
||||||
|
|
||||||
@ -1121,6 +1125,10 @@ void RimEclipseView::syncronizeWellsWithResults()
|
|||||||
// Set the new wells into the field.
|
// Set the new wells into the field.
|
||||||
this->wellCollection()->wells().insert(0, newWells);
|
this->wellCollection()->wells().insert(0, newWells);
|
||||||
|
|
||||||
|
if (isAnyWellCreated)
|
||||||
|
{
|
||||||
|
this->wellCollection()->assignDefaultWellColors();
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure all the wells have their reservoirView ptr setup correctly
|
// Make sure all the wells have their reservoirView ptr setup correctly
|
||||||
this->wellCollection()->setReservoirView(this);
|
this->wellCollection()->setReservoirView(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user