From: eap Date: Fri, 20 May 2005 12:40:36 +0000 (+0000) Subject: in reject(), do not remove SObject of prs from a locked study X-Git-Tag: V2_2_0_VISU_improvement_2005-05-27~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d3551698e22db4ab5c3ff5247825572b82474a38;p=modules%2Fvisu.git in reject(), do not remove SObject of prs from a locked study in accept(), do not close dlg if a study is locked --- diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx index 2c3f8da5..61172ece 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx @@ -571,7 +571,6 @@ VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg() void VisuGUI_Plot3DDlg::accept() { if ( !VisuGUI::CheckActiveStudyLock() ) { - reject(); return; } if (myIsoPane->check() && myScalarPane->check()) { @@ -614,11 +613,15 @@ void VisuGUI_Plot3DDlg::accept() void VisuGUI_Plot3DDlg::reject() { myIsoPane->check(); // hide preview - + if (!isModal() && myIsoPane->GetPrs() && - !VisuGUI::GetActor( myIsoPane->GetPrs() )) { - myIsoPane->GetPrs()->RemoveFromStudy(); - myIsoPane->GetStudyFrame()->getStudy()->updateObjBrowser(); + !VisuGUI::GetActor( myIsoPane->GetPrs() )) + { + SALOMEDS::Study_var aStudy = VisuGUI::GetActiveStudy()->getStudyDocument(); + if (!aStudy->GetProperties()->IsLocked()) { + myIsoPane->GetPrs()->RemoveFromStudy(); + myIsoPane->GetStudyFrame()->getStudy()->updateObjBrowser(); + } } QDialog::reject(); }