diff --git a/common/view/view.cpp b/common/view/view.cpp index d5e3bc1508..ec06e69eaf 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1401,7 +1401,7 @@ void VIEW::UpdateItems() return; unsigned int cntGeomUpdate = 0; - unsigned int cntAnyUpdate = 0; + bool anyUpdated = false; for( VIEW_ITEM* item : *m_allItems ) { @@ -1410,13 +1410,14 @@ void VIEW::UpdateItems() if( !vpd ) continue; - if( vpd->m_requiredUpdate & ( GEOMETRY | LAYERS ) ) - { - cntGeomUpdate++; - } if( vpd->m_requiredUpdate != NONE ) { - cntAnyUpdate++; + anyUpdated = true; + + if( vpd->m_requiredUpdate & ( GEOMETRY | LAYERS ) ) + { + cntGeomUpdate++; + } } } @@ -1456,7 +1457,7 @@ void VIEW::UpdateItems() } } - if( cntAnyUpdate ) + if( anyUpdated ) { GAL_UPDATE_CONTEXT ctx( m_gal );