mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
#7671 StimPlan XML import: fix unit system assert on missing file.
This commit is contained in:
1 parent
5f44c994bf
commit
9ad8b6ce69
1 file changed
+7
-2
@@ -308,7 +308,6 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
setUnitSystem( RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN );
|
||||
m_readError = true;
|
||||
}
|
||||
|
||||
@@ -818,7 +817,13 @@ void RimStimPlanFractureTemplate::convertToUnitSystem( RiaDefines::EclipseUnitSy
|
||||
m_readError = false;
|
||||
loadDataAndUpdate();
|
||||
|
||||
if ( m_stimPlanFractureDefinitionData.isNull() ) return;
|
||||
if ( m_stimPlanFractureDefinitionData.isNull() )
|
||||
{
|
||||
m_readError = true;
|
||||
// Force needed unit system when file reading fails to be able to open the project.
|
||||
setUnitSystem( neededUnit );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( neededUnit == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user