X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISUGUI%2FVisuGUI_Tools.cxx;h=4606134bce3fa591e69b75e922ec4b656bd2a48e;hb=da5787a5ec70051bfa72361e7d9c51fcf167ff6b;hp=47acac98449d23758e2155b75f72312b58343a62;hpb=63ddabdfdee86971b660064749e0e4ad7faee8cf;p=modules%2Fvisu.git diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 47acac98..4606134b 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -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),