From 1cb9f528720c26b5683ab01395ea2877100e0bb5 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 17 Jan 2014 14:37:04 +0000 Subject: [PATCH] 1. Fix bug: visibility state is not updated for view models not derived from SALOME_View class. 2. PPGP: manage visibility state properly --- src/SalomeApp/SalomeApp_Application.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index c7b16a8ae..389a5b367 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1843,7 +1843,7 @@ void SalomeApp_Application::updateVisibilityState( DataObjectList& theList, SALOME_View* aView = dynamic_cast( 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 ); } } } -- 2.39.2