X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_SWIG_WITHIHM%2FlibGEOM_Swig.cxx;h=21a3897d9372d6b3a312a91cfb497d82293f6471;hb=c8522ecee00dff320a0fe301e86f9574af1d9c8d;hp=9b688ead67654683afc9af7a74b2eb409e2901b4;hpb=5e3080a50e2ddb3beb564c81d4b8b5aa62fe86e3;p=modules%2Fgeom.git diff --git a/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx b/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx index 9b688ead6..21a3897d9 100644 --- a/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx +++ b/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -124,14 +124,9 @@ void GEOM_Swig::createAndDisplayGO( const char* theEntry, bool theUpdateViewer ) {} virtual void Execute() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if ( !app ) return; - SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( !study ) return; - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" ); - GEOM_Displayer( study ).Display( io, myUpdateViewer ); + GEOM_Displayer().Display( io, myUpdateViewer ); } }; @@ -186,14 +181,9 @@ void GEOM_Swig::eraseGO( const char* theEntry, bool theUpdateViewer ) {} virtual void Execute() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if ( !app ) return; - SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( !study ) return; - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" ); - GEOM_Displayer( study ).Erase( io, true, myUpdateViewer ); + GEOM_Displayer().Erase( io, true, myUpdateViewer ); } }; @@ -212,13 +202,7 @@ void GEOM_Swig::UpdateViewer() {} virtual void Execute() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if ( !app ) return; - - SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( !study ) return; - - GEOM_Displayer( study ).UpdateViewer(); + GEOM_Displayer().UpdateViewer(); } }; @@ -248,7 +232,7 @@ int GEOM_Swig::getIndexTopology( const char* theSubIOR, const char* theMainIOR ) if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aMainShape ) && !CORBA::is_nil( aSubShape ) ) { // get shapes operations interface GEOM::GEOM_IShapesOperations_var anIShapesOperations = - aGeomGen->GetIShapesOperations( aMainShape->GetStudyID() ); + aGeomGen->GetIShapesOperations(); if ( !CORBA::is_nil( anIShapesOperations ) ) index = anIShapesOperations->GetTopologyIndex( aMainShape, aSubShape ); } @@ -275,7 +259,7 @@ const char* GEOM_Swig::getShapeTypeString( const char* theIOR ) if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aShape ) ) { // get shapes operations interface GEOM::GEOM_IShapesOperations_var anIShapesOperations = - aGeomGen->GetIShapesOperations( aShape->GetStudyID() ); + aGeomGen->GetIShapesOperations(); if ( !CORBA::is_nil( anIShapesOperations ) ) aTypeName = anIShapesOperations->GetShapeTypeString( aShape ); } @@ -354,7 +338,7 @@ void TSetPropertyEvent::Execute() SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); if ( !study ) return; - GEOM_Displayer displayer( study ); + GEOM_Displayer displayer; SALOME_View* window = displayer.GetActiveView(); if ( !window ) return; @@ -363,7 +347,7 @@ void TSetPropertyEvent::Execute() study->setObjectProperty( mgrId, myEntry, myProperty, myValue ); - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toLatin1().data(), "GEOM" ); + Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toUtf8().data(), "GEOM" ); if ( window->isVisible( io ) ) displayer.Redisplay( io, myUpdateViewer ); } @@ -432,8 +416,8 @@ void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int th /*! \brief Set number of iso-lines to the presentation \param theEntry geometry object's entry - \param theNbU number of iso-lines along U axis (interger value >= 0) - \param theNbV number of iso-lines along V axis (interger value >= 0) + \param theNbU number of iso-lines along U axis (integer value >= 0) + \param theNbV number of iso-lines along V axis (integer value >= 0) \param theUpdateViewer \c true to update active view's contents */ void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer ) @@ -508,7 +492,7 @@ public: /*! \brief Initialize GEOM module's engine - \return \c true if initialization succeedes or \c false otherwise + \return \c true if initialization succeeds or \c false otherwise */ bool GEOM_Swig::initGeomGen() {