0030156: Visualization, TKV3d - Triangles outside of selection volume are selected
authorasl <asl@opencascade.com>
Mon, 24 Sep 2018 08:00:18 +0000 (11:00 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 26 Sep 2018 09:09:52 +0000 (12:09 +0300)
The addition of elements to map is put under correct condition that element overlaps with selection volume

src/Select3D/Select3D_SensitivePrimitiveArray.cxx

index f7dd11d..fc0c6ce 100644 (file)
@@ -1059,11 +1059,11 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement (SelectBasics
               myMinDepthElem = aPickResult.Depth();
             }
             aResult = Standard_True;
-          }
-          if (!myDetectedElemMap.IsNull()
-            && theMgr.GetActiveSelectionType() != SelectBasics_SelectingVolumeManager::Point)
-          {
-            myDetectedElemMap->ChangeMap().Add (aTriIndex);
+            if (!myDetectedElemMap.IsNull()
+              && theMgr.GetActiveSelectionType() != SelectBasics_SelectingVolumeManager::Point)
+            {
+              myDetectedElemMap->ChangeMap().Add(aTriIndex);
+            }
           }
         }
         if (myToDetectNode)