From: akl Date: Thu, 17 Apr 2008 05:55:03 +0000 (+0000) Subject: Fixing of IPAL19468 (Qt4 porting: "Create sub-mesh" dialog - no choice on Geometry... X-Git-Tag: V5_0_0~10 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=fe7a36de022e2c0632d804b489b59d0a17a26962 Fixing of IPAL19468 (Qt4 porting: "Create sub-mesh" dialog - no choice on Geometry selection). --- diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index 8544392ac..bedaa5ef5 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -536,15 +536,21 @@ void SMESHGUI_MeshDlg::setGeomPopupEnabled( const bool enable ) { if ( QToolButton* selBtn = qobject_cast( objectWg( Geom, Btn ))) { - disconnect( selBtn, SIGNAL( toggled(bool) ), this, SLOT( onGeomSelectionButton(bool) )); if ( enable ) { if ( ! myGeomPopup ) { myGeomPopup = new QMenu(); myGeomPopup->addAction( tr("DIRECT_GEOM_SELECTION") )->setData( DIRECT_GEOM_INDEX ); myGeomPopup->addAction( tr("GEOM_BY_MESH_ELEM_SELECTION") )->setData( GEOM_BY_MESH_INDEX ); connect( myGeomPopup, SIGNAL( triggered( QAction* ) ), SLOT( onGeomPopup( QAction* ) ) ); + connect( selBtn, SIGNAL( toggled(bool) ), this, SLOT( onGeomSelectionButton(bool) )); + } + } + else { + disconnect( selBtn, SIGNAL( toggled(bool) ), this, SLOT( onGeomSelectionButton(bool) )); + if ( myGeomPopup ) { + delete myGeomPopup; + myGeomPopup = 0; } - connect( selBtn, SIGNAL( toggled(bool) ), this, SLOT( onGeomSelectionButton(bool) )); } } }