Salome HOME
Fix sub-mesh creation by selection of mesh element + remove dead actors after BreakLink
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 6d875cfd244b33abcc75cb0d25e2e4e4b00136fe..fb1e7ad935186656edf292429984953583cf730f 100644 (file)
@@ -1419,9 +1419,16 @@ namespace
                 geomGen = GEOM::GEOM_Gen::_narrow(comp);
               }
             }
-            if (!CORBA::is_nil(geomGen)) {
+            if (!CORBA::is_nil(geomGen))
+            {
               geomGen->BreakLink(aREntry.toStdString().c_str());
               SMESHGUI::GetSMESHGUI()->updateObjBrowser();
+
+              // remove actors whose objects are removed by BreakLink()
+              QList<SUIT_ViewWindow*> wndList = SMESHGUI::desktop()->windows();
+              SUIT_ViewWindow* wnd;
+              foreach(wnd, wndList)
+                SMESH::UpdateActorsAfterUpdateStudy(wnd);
             }
           }
         }