#1976 RFT/PLT Plot. Associate well path and sim well when loading models and files

This commit is contained in:
Bjørn Erik Jensen
2017-10-11 15:23:14 +02:00
parent dcb1c40414
commit 6c51938000
3 changed files with 34 additions and 11 deletions

View File

@@ -49,6 +49,9 @@
#include "RimWellAllocationPlot.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "RimOilField.h"
#include "RimWellPathCollection.h"
#include "RimWellPath.h"
#include "cafPdmDocument.h"
#include "cafProgressInfo.h"
@@ -616,6 +619,18 @@ bool RimEclipseCase::openReserviorCase()
createTimeStepFormatString();
// Associate existing well paths with simulation wells
RimProject* proj = RiaApplication::instance()->project();
for (const auto& oilField : proj->oilFields())
{
for (const auto& wellPath : oilField->wellPathCollection()->wellPaths())
{
if (!wellPath->isAssociatedWithSimulationWell())
{
wellPath->tryAssociateWithSimulationWell();
}
}
}
return true;
}