Merge pull request #5054 from OPM/fix-selection-of-all-time-steps

Ensemble RFT : Avoid selection of large number of time steps
This commit is contained in:
Magne Sjaastad 2019-11-15 14:28:49 +01:00 committed by GitHub
commit 11d498423f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,11 +278,27 @@ void RimWellRftPlot::applyInitialSelections()
m_selectedSources, m_selectedSources,
channelTypesToUse ); channelTypesToUse );
std::vector<QDateTime> timeStepVector; if ( !relevantTimeSteps.empty() )
for ( const auto& item : relevantTimeSteps ) {
timeStepVector.push_back( item.first ); std::vector<QDateTime> timeStepVector;
m_selectedTimeSteps = timeStepVector; // If we have RFT data from multiple sources, relevant time steps end up with a small number of time steps
// If this is the case, pre-select all time steps
const size_t maxCountToPreSelect = 3;
if ( relevantTimeSteps.size() <= maxCountToPreSelect )
{
for ( const auto& item : relevantTimeSteps )
timeStepVector.push_back( item.first );
}
else
{
// If only one RFT source is available, we might get a large number of time steps causing performance
// issues Only select the first available time step
timeStepVector.push_back( relevantTimeSteps.begin()->first );
}
m_selectedTimeSteps = timeStepVector;
}
} }
syncCurvesFromUiSelection(); syncCurvesFromUiSelection();