X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_VTKUtils.cxx;h=734a076009731713ec90ee83b9aecfebc9e07411;hb=a90ef6efde9b07cd44333af32c174fdca08d8057;hp=b918db58dd3b97815a6eda2571f020e04a26a026;hpb=792462956dd1d73a68d681b931e91998d80a4500;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index b918db58d..734a07600 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -416,13 +416,32 @@ namespace SMESH{ } - void UpdateSelectionProp() { - SUIT_Study* aStudy = GetActiveStudy(); - SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( aStudy->application() ); + void UpdateSelectionProp( SMESHGUI* theModule ) { + if( !theModule ) + return; + + SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( theModule->application() ); + if( !app ) + { + MESSAGE( "UpdateSelectionProp: Application is null" ); + return; + } + SUIT_ViewManager* vm = app->activeViewManager(); + if( !vm ) + { + MESSAGE( "UpdateSelectionProp: View manager is null" ); + return; + } + QPtrVector views = vm->getViews(); - SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr(); + SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( theModule ); + if( !mgr ) + { + MESSAGE( "UpdateSelectionProp: Resource manager is null" ); + return; + } QColor aHiColor = mgr->colorValue( "SMESH", "SettingsSelectColor", Qt::white ), aSelColor = mgr->colorValue( "SMESH", "SettingsItemSelectColor", Qt::yellow ),