#1210 Using defult flow diag results if available when creating Well Alloc Plots

This commit is contained in:
Jacob Støren 2017-02-14 08:30:52 +01:00
parent a25bfd4513
commit 61e82c37b5
2 changed files with 6 additions and 1 deletions

View File

@ -64,7 +64,6 @@ void RicShowWellAllocationPlotFeature::onActionTriggered(bool isChecked)
// Make sure the summary plot window is created and visible
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
//RiaApplication::instance()->project()->updateConnectedEditors();
plotwindow->selectAsCurrentItem(flowPlotColl->defaultPlot());
}
}

View File

@ -116,7 +116,13 @@ void RimWellAllocationPlot::setFromSimulationWell(RimEclipseWell* simWell)
m_wellName = simWell->wellResults()->m_wellName;
m_timeStep = eclView->currentTimeStep();
// Use the active flow diag solutions, or the first one as default
m_flowDiagSolution = eclView->cellResult()->flowDiagSolution();
if ( !m_flowDiagSolution )
{
std::vector<RimFlowDiagSolution*> flowSolutions = m_case->flowDiagSolutions();
if ( flowSolutions.size() ) m_flowDiagSolution = flowSolutions.front();
}
loadDataAndUpdate();
}