Do not crash when using replace case to go from dual porosity to single porosity,

This commit is contained in:
jonjenssen authored and JJ committed 2026-11-06 14:16:31 +01:00
1 parent b367a65062
commit 4071b9c00d
2 files changed
+8 -2

No files matched your search

@@ -1508,6 +1508,11 @@ void RimEclipseResultDefinition::defineUiOrdering( QString uiConfigName, caf::Pd
uiOrdering.add( &m_porosityModelUiField );
uiOrdering.add( &m_showDualPorosityLabel );
}
else
{
m_porosityModelUiField.setValue( RiaDefines::PorosityModelType::MATRIX_MODEL );
m_porosityModel = m_porosityModelUiField();
}
if ( m_resultTypeUiField() == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS )
{
@@ -259,8 +259,9 @@ void RimSimWellInView::wellHeadTopBottomPosition( int frameIndex, cvf::Vec3d* to
// Position well head above top of active cells bounding box
const auto boundingBox = rimReservoirView->currentActiveCellInfo()->geometryBoundingBox();
const auto maxZ = boundingBox.max().z();
const auto extentZ = boundingBox.extent().z();
if ( !boundingBox.isValid() ) return;
const auto maxZ = boundingBox.max().z();
const auto extentZ = boundingBox.extent().z();
top->z() = maxZ + extentZ * rimReservoirView->wellCollection()->wellHeadPositionScaleFactor();
}