X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Displayer.cxx;h=bfd048dc8241e6b8e9358f8f9e7e0efbbe4300a1;hb=19720c1ef8ed1ff65a87ae63b7fff432b924b2f3;hp=95c44a602b5c84b3e04a1fc4707062c806746651;hpb=251f8c052dd12dd29922210dc901b295fe999a0e;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Displayer.cxx b/src/SMESHGUI/SMESHGUI_Displayer.cxx index 95c44a602..bfd048dc8 100644 --- a/src/SMESHGUI/SMESHGUI_Displayer.cxx +++ b/src/SMESHGUI/SMESHGUI_Displayer.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -66,13 +66,13 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_ if( vtk_viewer ) { SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView(); - SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() ); + SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toUtf8().data() ); if( !anActor ) - anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true ); + anActor = SMESH::CreateActor( entry.toUtf8().data(), true ); if( anActor ) { SMESH::DisplayActor( wnd, anActor ); - prs = LightApp_Displayer::buildPresentation( entry.toLatin1().data(), aViewFrame ); + prs = LightApp_Displayer::buildPresentation( entry.toUtf8().data(), aViewFrame ); } if( prs ) UpdatePrs( prs ); @@ -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( 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.toUtf8() ); CORBA::Object_var anObj = SMESH::SObjectToObject( obj ); /*