X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMGUI%2FGEOMGUI_OCCSelector.cxx;h=e99774513812eee665ea92c56e94b2a3237c691c;hb=d2046800b5f3ab6a56c3b9a72766f5d317a235e7;hp=6fed25fa8ef00cdaf98e2a3e2e4cfba981fffba5;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index 6fed25fa8..e99774513 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -21,7 +21,7 @@ // // File : GEOMGUI_OCCSelector.cxx // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com) -// + #include "GEOMGUI_OCCSelector.h" #include @@ -50,7 +50,7 @@ //================================================================ // Function : GEOMGUI_OCCSelector -// Purpose : +// Purpose : //================================================================ GEOMGUI_OCCSelector::GEOMGUI_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr ) : LightApp_OCCSelector( viewer, mgr ) @@ -59,7 +59,7 @@ GEOMGUI_OCCSelector::GEOMGUI_OCCSelector( OCCViewer_Viewer* viewer, SUIT_Selecti //================================================================ // Function : ~GEOMGUI_OCCSelector -// Purpose : +// Purpose : //================================================================ GEOMGUI_OCCSelector::~GEOMGUI_OCCSelector() { @@ -67,7 +67,7 @@ GEOMGUI_OCCSelector::~GEOMGUI_OCCSelector() //================================================================ // Function : getSelection -// Purpose : +// Purpose : //================================================================ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const { @@ -149,11 +149,11 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const //================================================================ // Function : getEntityOwners -// Purpose : +// Purpose : //================================================================ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, - const Handle(AIS_InteractiveContext)& theIC, - SelectMgr_IndexedMapOfOwner& theMap ) + const Handle(AIS_InteractiveContext)& theIC, + SelectMgr_IndexedMapOfOwner& theMap ) { if ( theObj.IsNull() || theIC.IsNull() ) return; @@ -172,19 +172,19 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, for ( sel->Init(); sel->More(); sel->Next() ) { Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive(); if ( entity.IsNull() ) - continue; + continue; Handle(SelectMgr_EntityOwner) owner = - Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId()); + Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId()); if ( !owner.IsNull() ) - theMap.Add( owner ); + theMap.Add( owner ); } } } //================================================================ // Function : setSelection -// Purpose : +// Purpose : //================================================================ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { @@ -221,15 +221,15 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) if ( indexesMap.IsBound( entry.toLatin1().data() ) ) #endif { - TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data()); - subIndexes.Add( subOwner->index() ); - //indexesMap.replace( entry, subIndexes ); + TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data()); + subIndexes.Add( subOwner->index() ); + //indexesMap.replace( entry, subIndexes ); } else { - TColStd_IndexedMapOfInteger subIndexes; - subIndexes.Add( subOwner->index() ); - indexesMap.Bind(entry.toLatin1().data(), subIndexes); + TColStd_IndexedMapOfInteger subIndexes; + subIndexes.Add( subOwner->index() ); + indexesMap.Bind(entry.toLatin1().data(), subIndexes); } } else // the owner is NOT a sub owner, maybe it is a DataOwner == GLOBAL selection @@ -237,11 +237,11 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) const LightApp_DataOwner* owner = dynamic_cast( (*itr).operator->() ); if ( owner ) { - SalomeApp_Study* appStudy = + SalomeApp_Study* appStudy = dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); - QString anEntry = appStudy->referencedToEntry( owner->entry() ); + QString anEntry = appStudy->referencedToEntry( owner->entry() ); - globalSelMap[anEntry] = 1; + globalSelMap[anEntry] = 1; } } } @@ -355,10 +355,10 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) const LightApp_DataOwner* owner = dynamic_cast( (*itr2).operator->() ); if ( owner ) { - SalomeApp_Study* appStudy = + SalomeApp_Study* appStudy = dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); - QString anEntry = appStudy->referencedToEntry( owner->entry() ); - if (globalSelMap[anEntry] == 1) mySelectedExternals.append(*itr2); + QString anEntry = appStudy->referencedToEntry( owner->entry() ); + if (globalSelMap[anEntry] == 1) mySelectedExternals.append(*itr2); } } }