From: san Date: Thu, 25 Dec 2014 16:09:57 +0000 (+0300) Subject: 0025661: Visualization - AIS_InteractiveContext::Load() is not symmetric to the local... X-Git-Tag: V6_9_0_beta~185 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=89cc29b0b5b3af8c3e43ca748eb19eddf7507409;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 1442529ea6..b8cb1cb323 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -471,13 +471,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); + } } }