]> OCCT Git - occt-copy.git/commitdiff
0030156: Triangles outside of selection volume are selected
authorasl <asl@opencascade.com>
Mon, 24 Sep 2018 08:00:18 +0000 (11:00 +0300)
committerasl <asl@opencascade.com>
Mon, 24 Sep 2018 08:00:18 +0000 (11:00 +0300)
The addition of elements to map is put under correct condition that element overlaps with selection volume

src/Select3D/Select3D_SensitivePrimitiveArray.cxx

index f7dd11d194641dda52bd8cd6f36d9a4a16286e3c..fc0c6ce432044f6b0b70f587328ce9218a322f4e 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)