#7942 Summary Plot: Make reading of summary data file more robust

- remove the gsl::not_null for pointer to curve data
- For summary cases linked to a grid model case, do not try to read the original location of file if grid file location is not valid (will happen when a project file is moved)
This commit is contained in:
Magne Sjaastad
2021-09-02 15:09:50 +02:00
parent e961dce97d
commit 640c59d682
4 changed files with 13 additions and 8 deletions

View File

@@ -145,9 +145,13 @@ RimEclipseCase* RimGridSummaryCase::associatedEclipseCase()
//--------------------------------------------------------------------------------------------------
QString RimGridSummaryCase::summaryHeaderFilename() const
{
if ( !m_eclipseCase() ) return m_summaryHeaderFilename().path();
if ( m_eclipseCase() )
{
auto candidate = summaryHeaderFilenameFromEclipseCase( m_eclipseCase );
if ( QFileInfo::exists( candidate ) ) return candidate;
}
return summaryHeaderFilenameFromEclipseCase( m_eclipseCase() );
return m_summaryHeaderFilename().path();
}
//--------------------------------------------------------------------------------------------------