From 0ba0e8265a63906ca0c21ba420adc54aec0744b6 Mon Sep 17 00:00:00 2001 From: enk Date: Wed, 29 Jun 2005 04:54:56 +0000 Subject: [PATCH] Restore method SetupDlg::onPreferencesDlg() --- src/VISUGUI/VisuGUI_TimeAnimation.cxx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index d5ece609..5df13375 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -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(aData.myPrs[0])); if (aDlg->exec()) { for (int i = 0; i < aData.myNbFrames; i++) aDlg->storeToPrsObject(dynamic_cast(aData.myPrs[i])); } delete aDlg;} +#define EDITPRS(TYPE, DLG) {\ + DLG* aDlg = new DLG(this);\ + aDlg->initFromPrsObject(dynamic_cast(aData.myPrs[0]));\ + if (aDlg->exec())\ + { \ + for (int i = 0; i < aData.myNbFrames; i++)\ + aDlg->storeToPrsObject(dynamic_cast(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(aData.myPrs.at(0))); aDlg->initFromPrsObject(dynamic_cast(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 -*/ + } //************************************************************************ -- 2.39.2