void VisuGUI_Plot3DDlg::accept()
{
if ( !VisuGUI::CheckActiveStudyLock() ) {
- reject();
return;
}
if (myIsoPane->check() && myScalarPane->check()) {
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();
}