-// Copyright (C) 2007-2016 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
GEOM::GEOM_FieldStep_var step;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( 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;
field = f;
}
}
+ }
}
- }
-
if ( !field->_is_nil()) {
int stepID;
if ( !step->_is_nil() ) {
// 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();
// 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
// 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();
//=====================================================================================
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;
}
ic->UpdateCurrentViewer();
}
- catch( Standard_Failure ) {
+ catch( Standard_Failure& ) {
MESSAGE( "Exception caught in EntityGUI::DisplaySimulationShape" );
}
}
//==================================================================================
void EntityGUI::EraseSimulationShape()
{
- MESSAGE("EntityGUI::EraseSimulationShape")
+ MESSAGE("EntityGUI::EraseSimulationShape");
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return;