]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
IPAL9193 (Jun 16)
authorasl <asl@opencascade.com>
Thu, 16 Jun 2005 11:04:03 +0000 (11:04 +0000)
committerasl <asl@opencascade.com>
Thu, 16 Jun 2005 11:04:03 +0000 (11:04 +0000)
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_Utils.cxx

index eb48d8144df29a323679f849edac57a7a6633341..2a763c298d2dfea20ad7b6b201b0fb70e03f9270 100644 (file)
@@ -100,10 +100,15 @@ QtxValue SMESHGUI_Selection::param( const int ind, const QString& p ) const
 SMESH_Actor* SMESHGUI_Selection::getActor( int ind ) const
 {
   if ( ind >= 0 && ind < myDataOwners.count() ) {
-    const SalomeApp_SVTKDataOwner* owner = 
-      dynamic_cast<const SalomeApp_SVTKDataOwner*> ( myDataOwners[ ind ].get() );
+    const SalomeApp_DataOwner* owner = 
+      dynamic_cast<const SalomeApp_DataOwner*> ( myDataOwners[ ind ].get() );
     if ( owner )
-      return dynamic_cast<SMESH_Actor*>( owner->GetActor() );
+      {
+       Handle( SALOME_InteractiveObject ) anObj = owner->IO();
+       QString entry = anObj->getEntry();
+       return dynamic_cast<SMESH_Actor*>( SMESH::FindActorByEntry( entry ) );
+      }
+      //return dynamic_cast<SMESH_Actor*>( owner->GetActor() );
   }
   return 0;
 }
index 7dbc44c72ba63c0bd19d3d95c8c6bd3ea7e9f810..78b99746048d2eec7d9af961e425f9035fb68ec2 100644 (file)
@@ -99,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;
   }