X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Selection.cxx;h=927ac7f1600c9d342eba449d86ad5e3e97e3eae6;hb=71d173d51a36d3a3ad7b51972b5be88c2df9865e;hp=1b281d27f2fbe22edd697f66034c1d1b247bd84f;hpb=b0105f0f9d05ef09ad770cf0d343901589cba620;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 1b281d27f..927ac7f16 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -1,3 +1,22 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// #include "SMESHGUI_Selection.h" #include "SMESHGUI_Utils.h" @@ -8,9 +27,9 @@ #include "SMESH_Type.h" #include "SMESH_Actor.h" -#include "SalomeApp_SelectionMgr.h" +#include "LightApp_SelectionMgr.h" #include "SalomeApp_Study.h" -#include "SalomeApp_VTKSelector.h" +#include "LightApp_VTKSelector.h" #include "SUIT_Session.h" @@ -25,7 +44,7 @@ //purpose : //======================================================================= SMESHGUI_Selection::SMESHGUI_Selection() -: SalomeApp_Selection() +: LightApp_Selection() { } @@ -41,13 +60,16 @@ SMESHGUI_Selection::~SMESHGUI_Selection() //function : init //purpose : //======================================================================= -void SMESHGUI_Selection::init( const QString& client, SalomeApp_SelectionMgr* mgr ) +void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr ) { - SalomeApp_Selection::init( client, mgr ); + LightApp_Selection::init( client, mgr ); if( mgr && study() ) { - _PTR(Study) aStudy = study()->studyDS(); + SalomeApp_Study* aSStudy = dynamic_cast(study()); + if (!aSStudy) + return; + _PTR(Study) aStudy = aSStudy->studyDS(); for( int i=0, n=count(); i ( ow ); + const LightApp_SVTKDataOwner* owner = + dynamic_cast ( ow ); if( owner ) myActors.append( dynamic_cast( owner->GetActor() ) ); else @@ -95,7 +117,7 @@ QtxValue SMESHGUI_Selection::param( const int ind, const QString& p ) const if( val.isValid() ) return val; else - return SalomeApp_Selection::param( ind, p ); + return LightApp_Selection::param( ind, p ); } //======================================================================= @@ -267,7 +289,7 @@ QVariant SMESHGUI_Selection::isComputable( int ind ) const if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { /* Handle(SALOME_InteractiveObject) io = - static_cast( myDataOwners[ ind ].get() )->IO(); + static_cast( myDataOwners[ ind ].get() )->IO(); if ( !io.IsNull() ) { SMESH::SMESH_Mesh_var mesh = SMESH::GetMeshByIO(io) ; // m,sm,gr->m if ( !mesh->_is_nil() ) {*/