X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FSelectMgr%2FSelectMgr_SelectionManager.cxx;h=3e6de7b357f515dd0b78c97492e180faeef35f5d;hb=0d5880e11acb155cf2e7147b52ac825c10a1a345;hpb=949c9b7f28a290179020da25c3fd7a8adc3ae846 diff --git a/src/SelectMgr/SelectMgr_SelectionManager.cxx b/src/SelectMgr/SelectMgr_SelectionManager.cxx index 20a10f80d1..3e6de7b357 100644 --- a/src/SelectMgr/SelectMgr_SelectionManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectionManager.cxx @@ -370,9 +370,10 @@ void SelectMgr_SelectionManager::Activate (const Handle(SelectMgr_SelectableObje if (myGlobal.Contains (theObject)) { - if (theMode != 0 && theSelector->IsActive (theObject, 0)) + const Standard_Integer aGlobalSelMode = theObject->GlobalSelectionMode(); + if (theMode != aGlobalSelMode && theSelector->IsActive (theObject, aGlobalSelMode)) { - theSelector->Deactivate (theObject->Selection (0)); + theSelector->Deactivate (theObject->Selection (aGlobalSelMode)); } theSelector->Activate (theObject->Selection (theMode)); }