]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
1. Fix bug: visibility state is not updated for view models not derived from SALOME_V...
authorvsr <vsr@opencascade.com>
Fri, 17 Jan 2014 14:37:04 +0000 (14:37 +0000)
committervsr <vsr@opencascade.com>
Fri, 17 Jan 2014 14:37:04 +0000 (14:37 +0000)
2. PPGP: manage visibility state properly

src/SalomeApp/SalomeApp_Application.cxx

index c7b16a8ae4bcaf0f84ccd7daf80a9588eb6e35fd..389a5b3670b6a8374e7bd5d0d4ed8a49896dc1a0 100644 (file)
@@ -1843,7 +1843,7 @@ void SalomeApp_Application::updateVisibilityState( DataObjectList& theList,
 
   SALOME_View* aView = dynamic_cast<SALOME_View*>( theViewModel );
 
-  if (theList.isEmpty() || !aView || !aStudy)
+  if (theList.isEmpty() || !aStudy)
     return;
 
   for ( DataObjectList::iterator itr = theList.begin(); itr != theList.end(); ++itr ) {
@@ -1859,13 +1859,13 @@ void SalomeApp_Application::updateVisibilityState( DataObjectList& theList,
       LightApp_Displayer* aDisplayer = anObjModule->displayer();
       if(aDisplayer) {
         if( aDisplayer->canBeDisplayed(obj->entry(), theViewModel->getType()) ) {
-          if(aDisplayer->IsDisplayed(obj->entry(),aView))
+          if(aView && aDisplayer->IsDisplayed(obj->entry(),aView))
             anObjState = Qtx::ShownState;
           else
             anObjState = Qtx::HiddenState;
         }
+       aStudy->setVisibilityState( obj->entry(), anObjState );
       }
-      aStudy->setVisibilityState( obj->entry(), anObjState );
     }
   }
 }