mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
If only one view, set the first result as active
This commit is contained in:
parent
7eb3e98bb2
commit
92d1bd9386
@ -810,6 +810,22 @@ void RimEclipseStatisticsCase::computeStatisticsAndUpdateViews()
|
||||
{
|
||||
RicNewViewFeature::addReservoirView( this, nullptr );
|
||||
}
|
||||
|
||||
if ( reservoirViews.size() == 1 )
|
||||
{
|
||||
// If only one view, set the first result as active
|
||||
|
||||
if ( auto cellResultsData = results( RiaDefines::PorosityModelType::MATRIX_MODEL ) )
|
||||
{
|
||||
auto firstView = reservoirViews[0];
|
||||
|
||||
std::vector<RigEclipseResultAddress> resAddresses = cellResultsData->existingResults();
|
||||
if ( firstView && !resAddresses.empty() )
|
||||
{
|
||||
firstView->cellResult()->setFromEclipseResultAddress( resAddresses[0] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user