From e1172d53cbea7b6659d35bf48ae3f37489fe5f1e Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 28 Jul 2005 08:28:28 +0000 Subject: [PATCH] IPAL9620: SIGSEGV on attempt to set properties of Cut Planes during animation setup --- src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 9 ++------- src/VISUGUI/VisuGUI_CutLinesDlg.h | 5 ++--- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 11 +++-------- src/VISUGUI/VisuGUI_CutPlanesDlg.h | 5 +---- src/VISUGUI/VisuGUI_TimeAnimation.cxx | 11 +++++------ 5 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 8bb166b6..6e3d7246 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -43,18 +43,13 @@ using namespace std; bool VisuGUI_CutLinesDlg::MYGenerateTable = true; bool VisuGUI_CutLinesDlg::MYGenerateCurve = true; -VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule, - bool theIsCreation, bool theIsModal) - : QDialog(VISU::GetDesktop(theModule), "VisuGUI_CutLinesDlg", theIsModal, +VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule) + : QDialog(VISU::GetDesktop(theModule), "VisuGUI_CutLinesDlg", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu), myPreviewActor(0) { - if (!theIsModal) { - setWFlags(getWFlags() | WDestructiveClose); - } setCaption("Cut Lines Definition"); setSizeGripEnabled(true); - myIsCreation = theIsCreation; QVBoxLayout* aMainLayout = new QVBoxLayout (this, 7, 6); aMainLayout->setSpacing(5); diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.h b/src/VISUGUI/VisuGUI_CutLinesDlg.h index 5d9d103a..0f225acb 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.h +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.h @@ -28,7 +28,7 @@ class VisuGUI_CutLinesDlg: public QDialog Q_OBJECT public: - VisuGUI_CutLinesDlg (SalomeApp_Module* theModule, bool theIsCreation = true, bool theIsModal = true); + VisuGUI_CutLinesDlg (SalomeApp_Module* theModule); ~VisuGUI_CutLinesDlg(); void initFromPrsObject (VISU::CutLines_i* thePrs); @@ -95,9 +95,8 @@ private: //jfa tmp:SUIT_ViewManager *myMgr; //jfa tmp:SUIT_ViewWindow *myStudyWnd; - bool myIsCreation; - static bool MYGenerateTable; static bool MYGenerateCurve; }; + #endif // VISUGUI_CUTLINESDLG_H diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 845a9a86..f55b4b54 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -458,17 +458,12 @@ void VisuGUI_CutPlanesPane::onPreviewCheck (bool thePreview) /*! Constructor */ -VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule, - bool theIsCreation, bool theIsModal) - : QDialog(VISU::GetDesktop(theModule), "VisuGUI_CutPlanesDlg", theIsModal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule) + : QDialog(VISU::GetDesktop(theModule), "VisuGUI_CutPlanesDlg", true, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - if (!theIsModal) { - setWFlags(getWFlags() | WDestructiveClose); - } setCaption("Cut Planes Definition"); setSizeGripEnabled(true); - myIsCreation = theIsCreation; QVBoxLayout* TopLayout = new QVBoxLayout (this); TopLayout->setSpacing(6); diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.h b/src/VISUGUI/VisuGUI_CutPlanesDlg.h index 227830fa..e5ccea9f 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.h +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.h @@ -105,8 +105,7 @@ class VisuGUI_CutPlanesDlg : public QDialog Q_OBJECT public: - VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule, - bool theIsCreation = true, bool theIsModal = true); + VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule); ~VisuGUI_CutPlanesDlg() {}; void initFromPrsObject (VISU::CutPlanes_i* thePrs); @@ -121,8 +120,6 @@ private: VisuGUI_CutPlanesPane* myCutPane; VisuGUI_ScalarBarPane* myScalarPane; VISU::CutPlanes_i* myPrs; - - bool myIsCreation; }; diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index d905c731..7d7c0232 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -650,7 +650,6 @@ void SetupDlg::onTypeChanged (int theIndex) //************************************************************************ void SetupDlg::onPreferencesDlg() { - MESSAGE("SetupDlg::onPreferencesDlg() is not implemented"); SUIT_OverrideCursor c; FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem()); if (aData.myPrs.empty()) @@ -689,10 +688,10 @@ void SetupDlg::onPreferencesDlg() EDITPRS(VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg); break; case TCUTPLANES_ITEM: //Cut Planes - // EDITPRS(VISU::CutPlanes_i, VisuGUI_CutPlanesDlg); - { - c.suspend(); - VisuGUI_CutPlanesDlg* aDlg = new VisuGUI_CutPlanesDlg(false, true); + c.suspend(); + EDITPRS(VISU::CutPlanes_i, VisuGUI_CutPlanesDlg); + /*{ + VisuGUI_CutPlanesDlg* aDlg = new VisuGUI_CutPlanesDlg (myModule); //_CS_PhB :operator [] .at aDlg->initFromPrsObject(dynamic_cast(aData.myPrs.at(0))); aDlg->initFromPrsObject(dynamic_cast(aData.myPrs[0])); @@ -702,7 +701,7 @@ void SetupDlg::onPreferencesDlg() aDlg->storeToPrsObject(dynamic_cast(aData.myPrs[i])); } delete aDlg; - } + }*/ break; case TPLOT3D_ITEM: //Plot 3D c.suspend(); -- 2.39.2