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

This commit is contained in:
Jacob Støren
2019-11-05 09:30:58 +01:00
parent 03b44fc36f
commit c6e4641725
+8 -5
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();
}
}
//--------------------------------------------------------------------------------------------------