- const int aType = aShape.ShapeType();
- if ( aType <= TopAbs_EDGE ) // edge, wire, face, shell, solid, compound
- {
- GEOM::short_array anIndexes;
-
- TColStd_IndexedMapOfInteger aMap;
- ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( anIO, aMap );
-
- if ( !aMap.IsEmpty() ) // subshape selection
- {
- myIndex = aMap( 1 );
- myObject = aSelectedObj;
- myEditCurrentArgument->setText( tr( "GEOM_EDGE" ) + "_1" );
- }
- else if ( aType == TopAbs_EDGE ) // single shape selection
- {
- myIndex = -1;
- myObject = aSelectedObj;
- myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) );
- }
- else // face, shell, solid or compound was selected, and NOT its subshape.
- {
- myIndex = -1;
- myObject = GEOM::GEOM_Object::_nil();
- }
- }
+ const int aType = aShape.ShapeType();
+ if ( aType <= TopAbs_EDGE ) // edge, wire, face, shell, solid, compound
+ {
+ GEOM::short_array anIndexes;
+
+ TColStd_IndexedMapOfInteger aMap;
+ SalomeApp_Application* anApp =
+ (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+ anApp->selectionMgr()->GetIndexes( anIO, aMap );
+
+ if ( !aMap.IsEmpty() ) // subshape selection
+ {
+ myIndex = aMap( 1 );
+ myObject = aSelectedObj;
+ myEditCurrentArgument->setText( tr( "GEOM_EDGE" ) + "_1" );
+ }
+ else if ( aType == TopAbs_EDGE ) // single shape selection
+ {
+ myIndex = -1;
+ myObject = aSelectedObj;
+ myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) );
+ }
+ else // face, shell, solid or compound was selected, and NOT its subshape.
+ {
+ myIndex = -1;
+ myObject = GEOM::GEOM_Object::_nil();
+ }
+ }