Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VISUGUI / VisuGUI_Plot3DDlg.cxx
index 54aa2650ad48ea295e44cee7c23bf6a71e796e4f..a79356329eca42f54ff6e809e4cb6baa31ee5da2 100644 (file)
@@ -254,6 +254,7 @@ void VisuGUI_Plot3DPane::storePrsParams()
   if (!myPipeCopy)
     myPipeCopy = VISU_Plot3DPL::New();
   if (myPrs) {
+    myPipeCopy->SetIDMapper(myPrs->GetPL()->GetIDMapper());
     myPipeCopy->ShallowCopy(myPrs->GetPL());
     storeToPrsObject(myPrs);
   }
@@ -550,38 +551,11 @@ VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule)
 //=======================================================================
 void VisuGUI_Plot3DDlg::accept()
 {
-/*if (!VISU::CheckActiveStudyLock()) {
-    return;
-  }
-  if (myIsoPane->check() && myScalarPane->check()) {
-    if (!isModal()) {
-      VISU::Plot3D_i* prs = myIsoPane->GetPrs();
-      bool isCreation = !VISU::GetActor(prs, myViewWindow);
-      if (storeToPrsObject(prs)) {
-       if (isCreation) { // creation
-         if (myViewWindow) {
-           try {
-              VISU::CreateActor(prs);
-           }
-           catch (...) {
-             reject();
-             return;
-           }
-           myViewWindow->onFitAll();
-         }
-       } else { // edition
-         VISU::RecreateActor(prs);
-          renderViewFrame(myViewWindow);
-       }
-      } else {
-       if (isCreation) {
-          prs->RemoveFromStudy();
-          //study->updateObjBrowser();
-       }
-      }
-}*/
-    QDialog::accept();
-//}
+  if (myIsoPane->check() && myScalarPane->check())
+    {
+      myScalarPane->deletePreview();
+      QDialog::accept();
+    }
 }
 
 //=======================================================================
@@ -591,14 +565,7 @@ void VisuGUI_Plot3DDlg::accept()
 void VisuGUI_Plot3DDlg::reject()
 {
   myIsoPane->check(); // hide preview
-
-/*if (!isModal() && myIsoPane->GetPrs() &&
-      !VISU::GetActor(myIsoPane->GetPrs(), myViewWindow)) {
-    _PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myModule));
-    if (!aStudy->GetProperties()->IsLocked()) {
-      myIsoPane->GetPrs()->RemoveFromStudy();
-      myIsoPane->GetStudyFrame()->getStudy()->updateObjBrowser();
-    }
-}*/
+  myScalarPane->deletePreview();
+  
   QDialog::reject();
 }