mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-26 07:07:55 +05:00
NPAL17269: Performance pb. when creating a group with GUI.
This commit is contained in:
parent
c75dbe444e
commit
06656bb3f5
@ -318,7 +318,10 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
|
||||
vw->unHighlightAll( false );
|
||||
|
||||
// DO the selection
|
||||
for ( int i = 1, n = ownersmap.Extent(); i <= n; i++ )
|
||||
int i = 1, n = ownersmap.Extent();
|
||||
bool isAutoHilight = ic->AutomaticHilight();
|
||||
ic->SetAutomaticHilight(Standard_False); // for better performance
|
||||
for (; i <= n; i++)
|
||||
{
|
||||
Handle(SelectMgr_EntityOwner) owner = ownersmap( i );
|
||||
if ( owner->State() )
|
||||
@ -329,8 +332,10 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
|
||||
else
|
||||
ic->AddOrRemoveSelected( Handle(AIS_InteractiveObject)::DownCast(owner->Selectable()), false );
|
||||
}
|
||||
ic->SetAutomaticHilight(isAutoHilight); // restore
|
||||
|
||||
vw->update();
|
||||
ic->HilightSelected(/*updateviewer*/Standard_True);
|
||||
//vw->update();
|
||||
|
||||
// fill extra selected
|
||||
mySelectedExternals.clear();
|
||||
|
@ -510,11 +510,17 @@ void GroupGUI_GroupDlg::add()
|
||||
//=================================================================================
|
||||
void GroupGUI_GroupDlg::remove()
|
||||
{
|
||||
bool isBlocked = myIdList->signalsBlocked();
|
||||
myIdList->blockSignals( true );
|
||||
|
||||
for ( int i = myIdList->count() - 1; i >= 0; i-- ) {
|
||||
if ( myIdList->isSelected( i ) )
|
||||
myIdList->removeItem( i );
|
||||
}
|
||||
updateState();
|
||||
|
||||
myIdList->blockSignals( isBlocked );
|
||||
|
||||
highlightSubShapes();
|
||||
}
|
||||
|
||||
|
||||
@ -694,6 +700,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
|
||||
return;
|
||||
|
||||
TColStd_MapOfInteger anIds;
|
||||
//TColStd_IndexedMapOfInteger anIds;
|
||||
|
||||
myBusy = true;
|
||||
|
||||
@ -701,10 +708,16 @@ void GroupGUI_GroupDlg::highlightSubShapes()
|
||||
if ( myIdList->isSelected( ii ) )
|
||||
anIds.Add( myIdList->item( ii )->text().toInt() );
|
||||
|
||||
LightApp_SelectionMgr* aSelMgr =
|
||||
((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr();
|
||||
SalomeApp_Application* app = myGeomGUI->getApp();
|
||||
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||
aSelMgr->clearSelected();
|
||||
aSelMgr->AddOrRemoveIndex( aSh->getIO(), anIds, false );
|
||||
aSelMgr->AddOrRemoveIndex(aSh->getIO(), anIds, false);
|
||||
//SUIT_DataOwnerPtrList aList;
|
||||
//Handle(SALOME_InteractiveObject) IObject = aSh->getIO();
|
||||
//for (int i = 1; i <= anIds.Extent(); i++)
|
||||
// aList.append(new LightApp_DataSubOwner(QString(IObject->getEntry()), anIds(i)));
|
||||
//aSelMgr->setSelected(aList, /*append*/false);
|
||||
////aSelMgr->selectObjects(aSh->getIO(), anIds, /*append*/false);
|
||||
|
||||
myBusy = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user