Salome HOME
Fix crash after 'Belong to' filter creation if there are no mesh in the study
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Utils.cxx
index 3b4976ea61c16e7e7de373eed84a403734b14a11..78b99746048d2eec7d9af961e425f9035fb68ec2 100644 (file)
@@ -56,6 +56,11 @@ namespace SMESH{
     return theModule->getApp()->selectionMgr();
   }
 
+  SUIT_ResourceMgr*
+  GetResourceMgr( const SalomeApp_Module* )
+  {
+    return SUIT_Session::session()->resourceMgr();
+  }
 
   _PTR(Study)
   GetCStudy(const SalomeApp_Study* theStudy)
@@ -94,8 +99,8 @@ namespace SMESH{
   {
     SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
       (SUIT_Session::session()->activeApplication());
-    if (app && app->activeViewManager())
-      return app->activeViewManager()->getActiveView();
+    if (app && app->desktop() )
+      return app->desktop()->activeWindow();
     else
       return NULL;
   }