]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Restore method SetupDlg::onPreferencesDlg()
authorenk <enk@opencascade.com>
Wed, 29 Jun 2005 04:54:56 +0000 (04:54 +0000)
committerenk <enk@opencascade.com>
Wed, 29 Jun 2005 04:54:56 +0000 (04:54 +0000)
src/VISUGUI/VisuGUI_TimeAnimation.cxx

index d5ece6098aa58c10872ac33fa1033afa9aa43f6e..5df133750ca9a74373ceff3c533b0675b973c6d6 100644 (file)
@@ -244,7 +244,7 @@ void SetupDlg::onTypeChanged (int theIndex)
 void SetupDlg::onPreferencesDlg()
 {
   MESSAGE("SetupDlg::onPreferencesDlg() is not implemented");
-/*  SUIT_OverrideCursor c;
+  SUIT_OverrideCursor c;
   FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem());
   if (aData.myPrs.empty())
     myAnimator->generatePresentations(myFieldLst->currentItem());
@@ -262,18 +262,29 @@ void SetupDlg::onPreferencesDlg()
 //     }
 
 
-#define EDITPRS(TYPE, DLG) {DLG* aDlg = new DLG(); aDlg->initFromPrsObject(dynamic_cast<TYPE*>(aData.myPrs[0])); if (aDlg->exec()) { for (int i = 0; i < aData.myNbFrames; i++) aDlg->storeToPrsObject(dynamic_cast<TYPE*>(aData.myPrs[i])); } delete aDlg;}
+#define EDITPRS(TYPE, DLG) {\
+        DLG* aDlg = new DLG(this);\
+        aDlg->initFromPrsObject(dynamic_cast<TYPE*>(aData.myPrs[0]));\
+        if (aDlg->exec())\
+        { \
+         for (int i = 0; i < aData.myNbFrames; i++)\
+          aDlg->storeToPrsObject(dynamic_cast<TYPE*>(aData.myPrs[i]));\
+        } \
+        delete aDlg;}
 
   switch (myTypeCombo->currentItem()) {
   case 0: //Scalar Map
+    c.suspend();
     EDITPRS(VISU::ScalarMap_i, VisuGUI_ScalarBarDlg);
     break;
   case 1: //Iso Surfaces
+    c.suspend();
     EDITPRS(VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg);
     break;
   case 2: //Cut Planes
     //    EDITPRS(VISU::CutPlanes_i, VisuGUI_CutPlanesDlg);
     {
+      c.suspend();
       VisuGUI_CutPlanesDlg* aDlg = new VisuGUI_CutPlanesDlg(false, true);
       //_CS_PhB :operator [] .at      aDlg->initFromPrsObject(dynamic_cast<VISU::CutPlanes_i*>(aData.myPrs.at(0)));
       aDlg->initFromPrsObject(dynamic_cast<VISU::CutPlanes_i*>(aData.myPrs[0]));
@@ -287,17 +298,20 @@ void SetupDlg::onPreferencesDlg()
     }
     break;
   case 3: //Deformed Shape
+    c.suspend();
     EDITPRS(VISU::DeformedShape_i, VisuGUI_DeformedShapeDlg);
     break;
   case 4: //Vectors
+    c.suspend();
     EDITPRS(VISU::Vectors_i, VisuGUI_VectorsDlg);
     break;
   case 5: //Stream Lines
+    c.suspend();
     EDITPRS(VISU::StreamLines_i, VisuGUI_StreamLinesDlg);
     break;
   }
 #undef EDITPRS
-*/
+
 }
 
 //************************************************************************