From f44f3fbf0b54abd2e6a730d44c51f94233802458 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 16 Jun 2005 11:04:03 +0000 Subject: [PATCH] IPAL9193 (Jun 16) --- src/SMESHGUI/SMESHGUI_Selection.cxx | 11 ++++++++--- src/SMESHGUI/SMESHGUI_Utils.cxx | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index eb48d8144..2a763c298 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -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 ( myDataOwners[ ind ].get() ); + const SalomeApp_DataOwner* owner = + dynamic_cast ( myDataOwners[ ind ].get() ); if ( owner ) - return dynamic_cast( owner->GetActor() ); + { + Handle( SALOME_InteractiveObject ) anObj = owner->IO(); + QString entry = anObj->getEntry(); + return dynamic_cast( SMESH::FindActorByEntry( entry ) ); + } + //return dynamic_cast( owner->GetActor() ); } return 0; } diff --git a/src/SMESHGUI/SMESHGUI_Utils.cxx b/src/SMESHGUI/SMESHGUI_Utils.cxx index 7dbc44c72..78b997460 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.cxx +++ b/src/SMESHGUI/SMESHGUI_Utils.cxx @@ -99,8 +99,8 @@ namespace SMESH{ { SalomeApp_Application* app = dynamic_cast (SUIT_Session::session()->activeApplication()); - if (app && app->activeViewManager()) - return app->activeViewManager()->getActiveView(); + if (app && app->desktop() ) + return app->desktop()->activeWindow(); else return NULL; } -- 2.39.2