]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL11994, PAL10455 - delete on references to mesh presentations
authorasl <asl@opencascade.com>
Thu, 6 Apr 2006 13:10:26 +0000 (13:10 +0000)
committerasl <asl@opencascade.com>
Thu, 6 Apr 2006 13:10:26 +0000 (13:10 +0000)
src/VISUGUI/VisuGUI.cxx

index d203d433f123122d514dd684eda967b86665e5fb..57ecfe7a477d08486bf4e4260c62bf7a57d97859 100644 (file)
@@ -1143,7 +1143,12 @@ OnDeleteObjects()
         CORBA::Object_var aCorbaObj = VISU::GetSelectedObj(anAppStudy, aRefObj->GetID());
         if (!CORBA::is_nil(aCorbaObj)) {
           VISU::Base_var aVisuObj = VISU::Base::_narrow(aCorbaObj);
-          if (!CORBA::is_nil(aVisuObj) && aVisuObj->GetType() == VISU::TCURVE) {
+          if (!CORBA::is_nil(aVisuObj) && aVisuObj->GetType() == VISU::TMESH)
+         {
+           DeleteSObject(this, aCStudy, aRefObj);
+           UpdateObjBrowser(this, true, aRefObj);
+         }
+          else if (!CORBA::is_nil(aVisuObj) && aVisuObj->GetType() == VISU::TCURVE) {
             VISU::Curve_ptr aCurve = VISU::Curve::_narrow(aVisuObj);
             _PTR(SObject) aParentSO = aSObject->GetFather();
             aCorbaObj = VISU::GetSelectedObj(anAppStudy, aParentSO->GetID());