Salome HOME
*** empty log message ***
[modules/visu.git] / src / VISUGUI / VisuGUI_Tools.cxx
index daa945005f0dd9545af44921e38371bf84f8443d..4606134bce3fa591e69b75e922ec4b656bd2a48e 100644 (file)
@@ -381,6 +381,8 @@ namespace VISU
 
     CORBA::Object_var anObj = VISU::ClientSObjectToObject(theSObject);
     if (!CORBA::is_nil(anObj)) {
+      ErasePrs(theModule, anObj);
+
       VISU::RemovableObject_var aRemovableObject = VISU::RemovableObject::_narrow(anObj);
       if (!CORBA::is_nil(aRemovableObject)) {
         aRemovableObject->RemoveFromStudy();
@@ -415,7 +417,6 @@ namespace VISU
       }
     }
     thePrs->RemoveFromStudy();
-    //theModule->updateObjBrowser(); //update Object browser
   }
 
   void
@@ -615,8 +616,14 @@ namespace VISU
       return aActor;
     if(SVTK_ViewWindow* aView = GetViewWindow(theModule)){
       QApplication::setOverrideCursor( Qt::waitCursor );
-      if(aActor = thePrs->CreateActor()){
-        aView->AddActor(aActor);
+      try{
+       if(aActor = thePrs->CreateActor())
+         aView->AddActor(aActor);
+      }catch(std::exception& exc){
+       SUIT_MessageBox::warn1(GetDesktop(theModule),
+                              QObject::tr("WRN_VISU"),
+                              QObject::tr("ERR_CANT_CREATE_ACTOR"),
+                              QObject::tr("BUT_OK"));
       }
       QApplication::restoreOverrideCursor();
     }
@@ -957,7 +964,6 @@ namespace VISU
               }
             }
           }
-          //theModule->updateObjBrowser();
           PlotContainer( theModule, pContainer, VISU::eDisplay );
         }
       }
@@ -1041,6 +1047,8 @@ namespace VISU
         timer.Show();
 #endif
         theModule->application()->putInfo(QObject::tr("INF_DONE"));
+        // Make "Save" button active
+        theModule->getApp()->updateActions();
       } catch (std::runtime_error& exc) {
         INFOS(exc.what());
         SUIT_MessageBox::warn1 (GetDesktop(theModule),