From: jfa Date: Thu, 21 Jun 2007 13:27:04 +0000 (+0000) Subject: Fix bug 14119: SIGSEGV on Geometry activating in next study. X-Git-Tag: V3_2_7~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e3a1162344bee64e2da063d5c14f91378e07ec56;p=modules%2Fgeom.git Fix bug 14119: SIGSEGV on Geometry activating in next study. --- diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.cxx b/src/DlgRef/DlgRef_Skeleton_QTD.cxx index dddb3e087..0e2b081bc 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.cxx +++ b/src/DlgRef/DlgRef_Skeleton_QTD.cxx @@ -20,7 +20,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_Skeleton_QTD.ui' ** -** Created: Fri Mar 17 11:18:06 2006 +** Created: Tue Mar 13 14:40:34 2007 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -57,11 +57,6 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, boo Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - GroupMedium = new QGroupBox( this, "GroupMedium" ); - GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) ); - - Layout1->addWidget( GroupMedium, 2, 0 ); - GroupButtons = new QGroupBox( this, "GroupButtons" ); GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) ); GroupButtons->setColumnLayout(0, Qt::Vertical ); @@ -155,19 +150,5 @@ DlgRef_Skeleton_QTD::~DlgRef_Skeleton_QTD() */ void DlgRef_Skeleton_QTD::languageChange() { - setCaption( tr( "DlgRef_Skeleton_QTD" ) ); - GroupMedium->setTitle( QString::null ); - GroupButtons->setTitle( QString::null ); - buttonOk->setText( tr( "&Ok" ) ); - buttonApply->setText( tr( "&Apply" ) ); - buttonCancel->setText( tr( "&Cancel" ) ); - buttonHelp->setText( tr( "&Help" ) ); - GroupConstructors->setTitle( QString::null ); - RadioButton1->setText( QString::null ); - RadioButton2->setText( QString::null ); - RadioButton3->setText( QString::null ); - RadioButton4->setText( QString::null ); - GroupBoxName->setTitle( tr( "Result name" ) ); - NameLabel->setText( tr( "Name" ) ); } diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.h b/src/DlgRef/DlgRef_Skeleton_QTD.h index 107b316a0..4148024d9 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.h +++ b/src/DlgRef/DlgRef_Skeleton_QTD.h @@ -20,7 +20,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_Skeleton_QTD.ui' ** -** Created: Fri Mar 17 11:18:06 2006 +** Created: Tue Mar 13 14:40:29 2007 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -51,7 +51,6 @@ public: DlgRef_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~DlgRef_Skeleton_QTD(); - QGroupBox* GroupMedium; QGroupBox* GroupButtons; QPushButton* buttonOk; QPushButton* buttonApply; diff --git a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui index b675f277c..8979116e8 100644 --- a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui @@ -20,9 +20,6 @@ 0 - - DlgRef_Skeleton_QTD - true @@ -50,22 +47,6 @@ 6 - - - GroupMedium - - - - 7 - 7 - 0 - 0 - - - - - - GroupButtons @@ -78,9 +59,6 @@ 0 - - - unnamed @@ -109,17 +87,11 @@ buttonOk - - &Ok - buttonApply - - &Apply - @@ -142,17 +114,11 @@ buttonCancel - - &Cancel - buttonHelp - - &Help - @@ -170,9 +136,6 @@ 0 - - - unnamed @@ -201,33 +164,21 @@ RadioButton1 - - - RadioButton2 - - - RadioButton3 - - - RadioButton4 - - - @@ -237,9 +188,6 @@ GroupBoxName - - Result name - unnamed @@ -273,9 +221,6 @@ NameLabel - - Name - diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx index 863f45fe9..302635f39 100644 --- a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx +++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx @@ -20,7 +20,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_Skeleton_QTD.ui' ** -** Created: Fri Mar 17 15:47:14 2006 +** Created: Tue Mar 13 14:04:48 2007 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -30,9 +30,9 @@ #include #include -#include #include #include +#include #include #include #include @@ -54,11 +54,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* nam Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - GroupVal = new QGroupBox( this, "GroupVal" ); - GroupVal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupVal->sizePolicy().hasHeightForWidth() ) ); - - Layout1->addWidget( GroupVal, 2, 0 ); - GroupConstructors = new QButtonGroup( this, "GroupConstructors" ); GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) ); GroupConstructors->setColumnLayout(0, Qt::Vertical ); @@ -111,26 +106,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* nam Layout5->addMultiCellWidget( GroupDest1, 0, 0, 0, 1 ); - GroupDest2 = new QButtonGroup( GroupDest, "GroupDest2" ); - GroupDest2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest2->sizePolicy().hasHeightForWidth() ) ); - GroupDest2->setColumnLayout(0, Qt::Vertical ); - GroupDest2->layout()->setSpacing( 6 ); - GroupDest2->layout()->setMargin( 11 ); - GroupDest2Layout = new QGridLayout( GroupDest2->layout() ); - GroupDest2Layout->setAlignment( Qt::AlignTop ); - - Layout5->addWidget( GroupDest2, 1, 0 ); - - GroupDest3 = new QButtonGroup( GroupDest, "GroupDest3" ); - GroupDest3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest3->sizePolicy().hasHeightForWidth() ) ); - GroupDest3->setColumnLayout(0, Qt::Vertical ); - GroupDest3->layout()->setSpacing( 6 ); - GroupDest3->layout()->setMargin( 11 ); - GroupDest3Layout = new QGridLayout( GroupDest3->layout() ); - GroupDest3Layout->setAlignment( Qt::AlignTop ); - - Layout5->addWidget( GroupDest3, 1, 1 ); - GroupDestLayout->addLayout( Layout5, 0, 0 ); Layout1->addWidget( GroupDest, 1, 0 ); @@ -190,21 +165,5 @@ EntityGUI_Skeleton_QTD::~EntityGUI_Skeleton_QTD() */ void EntityGUI_Skeleton_QTD::languageChange() { - setCaption( tr( "EntityGUI_Skeleton_QTD" ) ); - GroupVal->setTitle( QString::null ); - GroupConstructors->setTitle( tr( "Element Type" ) ); - RadioButton1->setText( tr( "Segment" ) ); - RadioButton2->setText( tr( "Arc" ) ); - GroupDest->setTitle( tr( "Destination" ) ); - GroupDest1->setTitle( tr( "Type" ) ); - RB_Dest2->setText( tr( "Direction" ) ); - RB_Dest1->setText( tr( "Point" ) ); - GroupDest2->setTitle( QString::null ); - GroupDest3->setTitle( QString::null ); - GroupButtons->setTitle( QString::null ); - buttonEnd->setText( tr( "End Sketch" ) ); - buttonClose->setText( tr( "Close Sketch" ) ); - buttonCancel->setText( tr( "&Cancel" ) ); - buttonHelp->setText( tr( "&Help" ) ); } diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.h b/src/EntityGUI/EntityGUI_Skeleton_QTD.h index ca95dc439..8c68a30bd 100644 --- a/src/EntityGUI/EntityGUI_Skeleton_QTD.h +++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.h @@ -20,7 +20,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_Skeleton_QTD.ui' ** -** Created: Fri Mar 17 15:47:13 2006 +** Created: Tue Mar 13 14:04:42 2007 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -36,9 +36,9 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QSpacerItem; -class QGroupBox; class QButtonGroup; class QRadioButton; +class QGroupBox; class QPushButton; class EntityGUI_Skeleton_QTD : public QDialog @@ -49,7 +49,6 @@ public: EntityGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~EntityGUI_Skeleton_QTD(); - QGroupBox* GroupVal; QButtonGroup* GroupConstructors; QRadioButton* RadioButton1; QRadioButton* RadioButton2; @@ -57,8 +56,6 @@ public: QButtonGroup* GroupDest1; QRadioButton* RB_Dest2; QRadioButton* RB_Dest1; - QButtonGroup* GroupDest2; - QButtonGroup* GroupDest3; QGroupBox* GroupButtons; QPushButton* buttonEnd; QPushButton* buttonClose; @@ -74,8 +71,6 @@ protected: QGridLayout* Layout5; QGridLayout* GroupDest1Layout; QGridLayout* Layout4; - QGridLayout* GroupDest2Layout; - QGridLayout* GroupDest3Layout; QHBoxLayout* GroupButtonsLayout; QHBoxLayout* Layout3; QSpacerItem* Spacer1; diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 1e6343cd2..c435a3dd1 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -82,10 +82,6 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH")); buttonHelp->setText(tr("GEOM_BUT_HELP")); - GroupVal->close(TRUE); - GroupDest2->close(TRUE); - GroupDest3->close(TRUE); - QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_UNDO"))); QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_REDO"))); diff --git a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui index c257a8086..cdcd86400 100644 --- a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui +++ b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui @@ -20,9 +20,6 @@ 0 - - EntityGUI_Skeleton_QTD - unnamed @@ -47,22 +44,6 @@ 6 - - - GroupVal - - - - 7 - 7 - 0 - 0 - - - - - - GroupConstructors @@ -75,9 +56,6 @@ 0 - - Element Type - unnamed @@ -106,17 +84,11 @@ RadioButton1 - - Segment - RadioButton2 - - Arc - @@ -134,9 +106,6 @@ 0 - - Destination - unnamed @@ -173,9 +142,6 @@ 0 - - Type - unnamed @@ -204,76 +170,16 @@ RB_Dest2 - - Direction - RB_Dest1 - - Point - - - - GroupDest2 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - - - GroupDest3 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - @@ -290,9 +196,6 @@ 0 - - - unnamed @@ -321,17 +224,11 @@ buttonEnd - - End Sketch - buttonClose - - Close Sketch - @@ -354,17 +251,11 @@ buttonCancel - - &Cancel - buttonHelp - - &Help - diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 396ec0daa..10b55c41d 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -36,6 +36,7 @@ #include "SUIT_Session.h" #include "SUIT_MessageBox.h" +#include #include using namespace std; @@ -57,12 +58,14 @@ GEOMBase_Skeleton::GEOMBase_Skeleton(GeometryGUI* theGeometryGUI, QWidget* paren if (!name) setName("GEOMBase_Skeleton"); + GroupBoxName->setTitle(tr("GEOM_RESULT_NAME_GRP")); + NameLabel->setText(tr("GEOM_RESULT_NAME_LBL")); + buttonCancel->setText(tr("GEOM_BUT_CLOSE")); buttonOk->setText(tr("GEOM_BUT_OK")); buttonApply->setText(tr("GEOM_BUT_APPLY")); buttonHelp->setText(tr("GEOM_BUT_HELP")); - GroupMedium->close(TRUE); resize(0, 0); Init(); diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index 7af013b20..029e8922a 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -205,14 +205,14 @@ GEOM::GEOM_Object_ptr GEOMGUI_Selection::getObject( const int index ) const return GEOM::GEOM_Object::_nil(); } -QString GEOMGUI_Selection:: selectionMode() const -{ +QString GEOMGUI_Selection::selectionMode() const +{ SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); if (app) { GeometryGUI* aGeomGUI = dynamic_cast( app->module( "Geometry" ) ); - if(aGeomGUI) - switch(aGeomGUI->getLocalSelectionMode()) - { + if (aGeomGUI) { + switch (aGeomGUI->getLocalSelectionMode()) + { case GEOM_POINT : return "VERTEX"; case GEOM_EDGE : return "EDGE"; case GEOM_WIRE : return "WIRE"; @@ -222,6 +222,8 @@ QString GEOMGUI_Selection:: selectionMode() const case GEOM_COMPOUND : return "COMPOUND"; case GEOM_ALLOBJECTS : return "ALL"; default: return ""; - } + } + } } + return ""; } diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po index b3be4b2f2..3a2e2c94d 100644 --- a/src/GEOMGUI/GEOM_msg_en.po +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -2942,6 +2942,12 @@ msgstr "Rename" msgid "NAME_LBL" msgstr "Name: " +msgid "GEOM_RESULT_NAME_GRP" +msgstr "Result name" + +msgid "GEOM_RESULT_NAME_LBL" +msgstr "Name" + msgid "GEOM_ERR_GET_ENGINE" msgstr "Failed to obtain GEOM Engine component. Reload Geometry module and try again." diff --git a/src/GroupGUI/GroupGUI_GroupDlg.h b/src/GroupGUI/GroupGUI_GroupDlg.h index a42fad91e..3e9f34618 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.h +++ b/src/GroupGUI/GroupGUI_GroupDlg.h @@ -32,6 +32,7 @@ #include +class QGroupBox; class QLineEdit; class QListBox; @@ -89,6 +90,7 @@ private: GEOM::GEOM_Object_var myMainObj; GEOM::GEOM_Object_var myGroup; + QGroupBox* GroupMedium; QPushButton* mySelBtn; QLineEdit* myMainName; QPushButton* mySelSubBtn; diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index 1c7684c14..abcdf63a7 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -61,12 +61,11 @@ MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, GEOMBase_Helper( dynamic_cast( parent ) ), myGeomGUI( GUI ) { - mySelBtn = 0; mySelEdit = 0; myDisplayer = 0; myHelpFileName = ""; - + if ( !name ) setName( "MeasureGUI_Skeleton" ); @@ -75,7 +74,6 @@ MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, buttonClose->setAutoDefault( false ); - GroupMedium->close( TRUE ); resize( 350, 0 ); } diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx index cc518f461..5a01f5818 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx @@ -20,7 +20,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui' ** -** Created: Tue Mar 21 10:10:08 2006 +** Created: Tue Mar 13 14:20:24 2007 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -96,11 +96,6 @@ MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* n Layout1->addWidget( GroupConstructors, 0, 0 ); - GroupMedium = new QGroupBox( this, "GroupMedium" ); - GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) ); - - Layout1->addWidget( GroupMedium, 1, 0 ); - MeasureGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 ); languageChange(); resize( QSize(228, 266).expandedTo(minimumSizeHint()) ); @@ -121,12 +116,5 @@ MeasureGUI_Skeleton_QTD::~MeasureGUI_Skeleton_QTD() */ void MeasureGUI_Skeleton_QTD::languageChange() { - setCaption( tr( "MeasureGUI_Skeleton_QTD" ) ); - GroupButtons->setTitle( QString::null ); - buttonClose->setText( tr( "&Close" ) ); - buttonHelp->setText( tr( "&Help" ) ); - GroupConstructors->setTitle( QString::null ); - RadioButton1->setText( QString::null ); - GroupMedium->setTitle( QString::null ); } diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h index aefba0130..0551ff942 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h @@ -20,7 +20,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui' ** -** Created: Tue Mar 21 10:10:08 2006 +** Created: Tue Mar 13 14:20:20 2007 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! @@ -54,7 +54,6 @@ public: QPushButton* buttonHelp; QButtonGroup* GroupConstructors; QRadioButton* RadioButton1; - QGroupBox* GroupMedium; protected: QGridLayout* MeasureGUI_Skeleton_QTDLayout; diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui index 07f94c80d..fa012c203 100644 --- a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui +++ b/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui @@ -20,9 +20,6 @@ 0 - - MeasureGUI_Skeleton_QTD - true @@ -62,9 +59,6 @@ 0 - - - unnamed @@ -110,17 +104,11 @@ buttonClose - - &Close - buttonHelp - - &Help - @@ -138,9 +126,6 @@ 0 - - - unnamed @@ -169,30 +154,11 @@ RadioButton1 - - - - - - GroupMedium - - - - 7 - 7 - 0 - 0 - - - - - -