From d3551698e22db4ab5c3ff5247825572b82474a38 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 20 May 2005 12:40:36 +0000 Subject: [PATCH] in reject(), do not remove SObject of prs from a locked study in accept(), do not close dlg if a study is locked --- src/VISUGUI/VisuGUI_Plot3DDlg.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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(); } -- 2.39.2