#9859 PLT plot: Fix missing LAS data for regression test

This commit is contained in:
Magne Sjaastad 2023-02-17 09:14:25 +01:00
parent 320ece44dd
commit 345095185e

View File

@ -1017,8 +1017,27 @@ void RimWellPltPlot::initAfterLoad()
std::vector<RifDataSourceForRftPlt> selectedSources;
for ( RimDataSourceForRftPlt* addr : m_selectedSourcesForIo )
{
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2023.1.0" ) &&
addr->address().sourceType() == RifDataSourceForRftPlt::SourceType::OBSERVED_LAS_FILE )
{
// In previous versions, the observed LAS files were not stored in the project file, but handled as a unity.
// Now we have more observed data types, and need to show all LAS files individually for selection
auto wellLogFiles = RimWellPlotTools::wellLogFilesContainingFlow( m_wellPathName );
if ( !wellLogFiles.empty() )
{
for ( const auto& wellLogFile : wellLogFiles )
{
auto addr = RifDataSourceForRftPlt( wellLogFile );
selectedSources.push_back( addr );
}
}
continue;
}
selectedSources.push_back( addr->address() );
}
m_selectedSources = selectedSources;
}