From: san Date: Thu, 25 Dec 2014 16:13:18 +0000 (+0300) Subject: 0025661: Visualization - AIS_InteractiveContext::Load() is not symmetric to the local... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a2ad59f7e2f7fa67a6f8e1fa3b5daa22fe9a3e45;p=occt-copy.git 0025661: Visualization - AIS_InteractiveContext::Load() is not symmetric to the local context method Register theIObj in the selection manager to prepare further activation of selection --- diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index f220dbab6f..d07350ba5b 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -558,13 +558,21 @@ void AIS_InteractiveContext::Load (const Handle(AIS_InteractiveObject)& theIObj, } if (theSelMode == -1 - && !theToAllowDecomposition - && !myObjects.IsBound (theIObj)) + && !theToAllowDecomposition) { - Standard_Integer aDispMode, aHiMod, aSelModeDef; - GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef); - Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Erased, aDispMode, aSelModeDef); - myObjects.Bind (theIObj, aStatus); + if (!myObjects.IsBound (theIObj)) + { + Standard_Integer aDispMode, aHiMod, aSelModeDef; + GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef); + Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Erased, aDispMode, aSelModeDef); + myObjects.Bind (theIObj, aStatus); + } + + // Register theIObj in the selection manager to prepare further activation of selection + if (!mgrSelector->Contains (theIObj)) + { + mgrSelector->Load (theIObj); + } } }