Robustness : Always return valid displayModelOffset

This commit is contained in:
Magne Sjaastad 2018-06-29 16:15:43 +02:00
parent fda735d109
commit 49ef8c6f55

View File

@ -474,7 +474,13 @@ void RimGeoMechCase::setApplyTimeFilter(bool applyTimeFilter)
//--------------------------------------------------------------------------------------------------
cvf::Vec3d RimGeoMechCase::displayModelOffset() const
{
return this->allCellsBoundingBox().min();
auto bb = this->allCellsBoundingBox();
if (bb.isValid())
{
return this->allCellsBoundingBox().min();
}
return cvf::Vec3d::ZERO;
}
//--------------------------------------------------------------------------------------------------