mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
untabify
This commit is contained in:
parent
656071da94
commit
ad24433a09
@ -21,7 +21,7 @@
|
|||||||
//
|
//
|
||||||
// File : GEOMGUI_OCCSelector.cxx
|
// File : GEOMGUI_OCCSelector.cxx
|
||||||
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
|
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
|
||||||
//
|
|
||||||
#include "GEOMGUI_OCCSelector.h"
|
#include "GEOMGUI_OCCSelector.h"
|
||||||
|
|
||||||
#include <LightApp_DataSubOwner.h>
|
#include <LightApp_DataSubOwner.h>
|
||||||
@ -152,8 +152,8 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
|
|||||||
// Purpose :
|
// Purpose :
|
||||||
//================================================================
|
//================================================================
|
||||||
static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
|
static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
|
||||||
const Handle(AIS_InteractiveContext)& theIC,
|
const Handle(AIS_InteractiveContext)& theIC,
|
||||||
SelectMgr_IndexedMapOfOwner& theMap )
|
SelectMgr_IndexedMapOfOwner& theMap )
|
||||||
{
|
{
|
||||||
if ( theObj.IsNull() || theIC.IsNull() )
|
if ( theObj.IsNull() || theIC.IsNull() )
|
||||||
return;
|
return;
|
||||||
@ -172,12 +172,12 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
|
|||||||
for ( sel->Init(); sel->More(); sel->Next() ) {
|
for ( sel->Init(); sel->More(); sel->Next() ) {
|
||||||
Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
|
Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
|
||||||
if ( entity.IsNull() )
|
if ( entity.IsNull() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Handle(SelectMgr_EntityOwner) owner =
|
Handle(SelectMgr_EntityOwner) owner =
|
||||||
Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId());
|
Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId());
|
||||||
if ( !owner.IsNull() )
|
if ( !owner.IsNull() )
|
||||||
theMap.Add( owner );
|
theMap.Add( owner );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -221,15 +221,15 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
|
|||||||
if ( indexesMap.IsBound( entry.toLatin1().data() ) )
|
if ( indexesMap.IsBound( entry.toLatin1().data() ) )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data());
|
TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data());
|
||||||
subIndexes.Add( subOwner->index() );
|
subIndexes.Add( subOwner->index() );
|
||||||
//indexesMap.replace( entry, subIndexes );
|
//indexesMap.replace( entry, subIndexes );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TColStd_IndexedMapOfInteger subIndexes;
|
TColStd_IndexedMapOfInteger subIndexes;
|
||||||
subIndexes.Add( subOwner->index() );
|
subIndexes.Add( subOwner->index() );
|
||||||
indexesMap.Bind(entry.toLatin1().data(), subIndexes);
|
indexesMap.Bind(entry.toLatin1().data(), subIndexes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // the owner is NOT a sub owner, maybe it is a DataOwner == GLOBAL selection
|
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<const LightApp_DataOwner*>( (*itr).operator->() );
|
const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
|
||||||
if ( owner )
|
if ( owner )
|
||||||
{
|
{
|
||||||
SalomeApp_Study* appStudy =
|
SalomeApp_Study* appStudy =
|
||||||
dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
dynamic_cast<SalomeApp_Study*>( 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<const LightApp_DataOwner*>( (*itr2).operator->() );
|
const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr2).operator->() );
|
||||||
if ( owner )
|
if ( owner )
|
||||||
{
|
{
|
||||||
SalomeApp_Study* appStudy =
|
SalomeApp_Study* appStudy =
|
||||||
dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
||||||
QString anEntry = appStudy->referencedToEntry( owner->entry() );
|
QString anEntry = appStudy->referencedToEntry( owner->entry() );
|
||||||
if (globalSelMap[anEntry] == 1) mySelectedExternals.append(*itr2);
|
if (globalSelMap[anEntry] == 1) mySelectedExternals.append(*itr2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user