0026628: Button Erase (Delete where erase algorythm is used) works incorrect
[occt.git] / samples / mfc / standard / Common / OCC_3dBaseDoc.cpp
index 6e225fd..0655c57 100755 (executable)
@@ -293,10 +293,7 @@ void OCC_3dBaseDoc::OnUpdateObjectColor(CCmdUI* pCmdUI)
 
 void OCC_3dBaseDoc::OnObjectErase() 
 {
-  for (myAISContext->InitCurrent(); myAISContext->MoreCurrent(); myAISContext->NextCurrent())
-  {
-    myAISContext->Erase (myAISContext->Current(), Standard_True);
-  }
+  myAISContext->EraseSelected();
   myAISContext->ClearCurrents();
 }
 void OCC_3dBaseDoc::OnUpdateObjectErase(CCmdUI* pCmdUI)