0030156: Visualization, TKV3d - Triangles outside of selection volume are selected
[occt.git] / 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)