X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEntityGUI%2FEntityGUI.cxx;h=b47285b72a5f96d04fdc9ec6322fed5ae79cbe88;hb=888b3b52e179ae1505352d56ba63477275693919;hp=67cfa16f3dc51736a5d57427c00864bac78e3358;hpb=6fc8283dbbb497e617cb36deae082fdeae4e3844;p=modules%2Fgeom.git diff --git a/src/EntityGUI/EntityGUI.cxx b/src/EntityGUI/EntityGUI.cxx index 67cfa16f3..b47285b72 100644 --- a/src/EntityGUI/EntityGUI.cxx +++ b/src/EntityGUI/EntityGUI.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -141,14 +141,16 @@ bool EntityGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) GEOM::GEOM_FieldStep_var step; SalomeApp_Study* study = dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); - if ( aList.Extent() > 0 && study ) { + if ( study ) for ( ; anIter.More(); anIter.Next() ) { Handle(SALOME_InteractiveObject) anIObj = anIter.Value(); if ( !anIObj.IsNull() && anIObj->hasEntry() ) - if ( _PTR(SObject) obj = study->studyDS()->FindObjectID( anIObj->getEntry() )) + { + _PTR(SObject) obj = study->studyDS()->FindObjectID( anIObj->getEntry() ); + if ( GeometryGUI::IsInGeomComponent( obj )) { - CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject( obj ); + CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject( obj ); GEOM::GEOM_BaseObject_var bo = GEOM::GEOM_BaseObject::_narrow( corbaObj ); GEOM::GEOM_Field_var f; GEOM::GEOM_FieldStep_var s; @@ -173,9 +175,8 @@ bool EntityGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) field = f; } } + } } - } - if ( !field->_is_nil()) { int stepID; if ( !step->_is_nil() ) { @@ -212,7 +213,7 @@ bool EntityGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) // function : 0nMousePress() // purpose : [static] manage mouse events //================================================================================= -bool EntityGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow ) +bool EntityGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* theViewWindow ) { QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox(); @@ -294,7 +295,7 @@ bool EntityGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWi // function : 0nMouseRelease() // purpose : [static] manage mouse events //================================================================================= -bool EntityGUI::OnMouseRelease( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow ) +bool EntityGUI::OnMouseRelease( QMouseEvent* pe, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* theViewWindow ) { ((OCCViewer_ViewWindow*)theViewWindow)->setSketcherStyle(false); #ifdef WITH_OPENCV @@ -323,7 +324,7 @@ bool EntityGUI::OnMouseRelease( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_View // function : 0nMouseMove() // purpose : [static] manage mouse events //================================================================================= -bool EntityGUI::OnMouseMove( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow ) +bool EntityGUI::OnMouseMove( QMouseEvent* pe, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* theViewWindow ) { QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox(); @@ -351,7 +352,7 @@ bool EntityGUI::OnMouseMove( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWin //===================================================================================== void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Shape& S2 ) { - MESSAGE("EntityGUI::DisplaySimulationShape") + MESSAGE("EntityGUI::DisplaySimulationShape"); SalomeApp_Application* app = getGeometryGUI()->getApp(); if ( !app ) return; @@ -389,7 +390,7 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha } ic->UpdateCurrentViewer(); } - catch( Standard_Failure ) { + catch( Standard_Failure& ) { MESSAGE( "Exception caught in EntityGUI::DisplaySimulationShape" ); } } @@ -400,7 +401,7 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha //================================================================================== void EntityGUI::EraseSimulationShape() { - MESSAGE("EntityGUI::EraseSimulationShape") + MESSAGE("EntityGUI::EraseSimulationShape"); SalomeApp_Application* app = getGeometryGUI()->getApp(); if ( !app ) return;