Salome HOME
Merge multi-study removal branch.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Displayer.cxx
index 6fa1ee65c890bcd55e362321a7c2965725f447e5..633d9196abbb7570e76281e887a010e33ca567a0 100644 (file)
@@ -68,7 +68,7 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_
       SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
       SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() );
       if( !anActor )
-        anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true );
+        anActor = SMESH::CreateActor( entry.toLatin1().data(), true );
       if( anActor )
       {
         SMESH::DisplayActor( wnd, anActor );
@@ -94,12 +94,7 @@ bool SMESHGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vi
   if(viewer_type != SVTK_Viewer::Type())
     return res;
   
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
-  if( !study )
-    return res;
-  
-  
-  _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry.toLatin1() );
+  _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( (const char*)entry.toLatin1() );
   CORBA::Object_var anObj = SMESH::SObjectToObject( obj );
   
     /*