caf::Viewer: Avoid updating boundingboxes when static models are not removed

This commit is contained in:
Jacob Støren 2019-11-04 17:06:21 +01:00
parent 03b44fc36f
commit c6e4641725

View File

@ -1358,12 +1358,15 @@ void caf::Viewer::addStaticModelOnce(cvf::Model* model, bool isForComparisonView
//--------------------------------------------------------------------------------------------------
void caf::Viewer::removeStaticModel(cvf::Model* model)
{
removeModelFromAllFrames(model);
m_staticModels.erase(model);
m_comparisonStaticModels.erase(model);
if ( m_staticModels.contains(model) || m_comparisonStaticModels.contains(model) )
{
removeModelFromAllFrames(model);
updateCachedValuesInScene();
m_staticModels.erase(model);
m_comparisonStaticModels.erase(model);
updateCachedValuesInScene();
}
}
//--------------------------------------------------------------------------------------------------