]> OCCT Git - occt.git/commitdiff
temporary patch to avoid deactivate selection on children after the parent's hiding
authoralex <alex>
Tue, 15 Oct 2019 11:59:45 +0000 (14:59 +0300)
committerNikolay Gavrilov <nikolay.gavrilov@opencascade.com>
Thu, 11 Aug 2022 12:42:41 +0000 (15:42 +0300)
src/SelectMgr/SelectMgr_SelectionManager.cxx

index 8ba04c4b15bd09ddaa2fca7525a2d0d5277eea35..33d34b12b816f4a88babb779475ce141e4ed454f 100644 (file)
@@ -191,9 +191,12 @@ void SelectMgr_SelectionManager::Activate (const Handle(SelectMgr_SelectableObje
 void SelectMgr_SelectionManager::Deactivate (const Handle(SelectMgr_SelectableObject)& theObject,
                                              const Standard_Integer theMode)
 {
-  for (PrsMgr_ListOfPresentableObjectsIter anChildrenIter (theObject->Children()); anChildrenIter.More(); anChildrenIter.Next())
+  if (theObject->ToPropagateVisualState())
   {
-    Deactivate (Handle(SelectMgr_SelectableObject)::DownCast (anChildrenIter.Value()), theMode);
+    for (PrsMgr_ListOfPresentableObjectsIter anChildrenIter(theObject->Children()); anChildrenIter.More(); anChildrenIter.Next())
+    {
+      Deactivate(Handle(SelectMgr_SelectableObject)::DownCast(anChildrenIter.Value()), theMode);
+    }
   }
   if (!theObject->HasOwnPresentations())
   {