mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
commit
11d498423f
@ -278,11 +278,27 @@ void RimWellRftPlot::applyInitialSelections()
|
||||
m_selectedSources,
|
||||
channelTypesToUse );
|
||||
|
||||
std::vector<QDateTime> timeStepVector;
|
||||
for ( const auto& item : relevantTimeSteps )
|
||||
timeStepVector.push_back( item.first );
|
||||
if ( !relevantTimeSteps.empty() )
|
||||
{
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user