From ddf46274fa27f511c377892e39af463fbf71876c Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 4 Dec 2007 14:05:57 +0000 Subject: [PATCH] SubshapeSelection in CreateGroupDlg changed on RadioButton --- src/GroupGUI/GroupGUI_GroupDlg.cxx | 6 +++--- src/GroupGUI/GroupGUI_GroupDlg.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index ef57e4f47..b47f08acb 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -93,7 +93,7 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg(Mode mode, GeometryGUI* theGeometryGUI, QWi myMainName->setReadOnly( true ); myMainName->setEnabled( myMode == CreateGroup ); - mySelSubBtn = new QPushButton( tr( "SELECT_SUB_SHAPES" ), aFrame ); + mySelSubBtn = new QRadioButton (tr( "SELECT_SUB_SHAPES" ), aFrame ); mySelAllBtn = new QPushButton( tr( "SELECT_ALL" ), aFrame ); myAddBtn = new QPushButton( tr( "ADD" ), aFrame ); myRemBtn = new QPushButton( tr( "REMOVE" ), aFrame ); @@ -128,7 +128,7 @@ GroupGUI_GroupDlg::~GroupGUI_GroupDlg() void GroupGUI_GroupDlg::Init() { // san -- TODO: clear selected sub-shapes... - + mySelSubBtn->setChecked( true ); if ( myMode == CreateGroup ) { initName( tr( "GROUP_PREFIX" ) ); @@ -272,7 +272,7 @@ void GroupGUI_GroupDlg::SetEditCurrentArgument() if ( send == mySelBtn ) myEditCurrentArgument = myMainName; - else if ( send == mySelSubBtn || send == mySelAllBtn ) + else if ( (QRadioButton*)sender() == mySelSubBtn || send == mySelAllBtn ) myEditCurrentArgument = 0; activateSelection(); diff --git a/src/GroupGUI/GroupGUI_GroupDlg.h b/src/GroupGUI/GroupGUI_GroupDlg.h index 3e9f34618..98c1e604d 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.h +++ b/src/GroupGUI/GroupGUI_GroupDlg.h @@ -35,6 +35,7 @@ class QGroupBox; class QLineEdit; class QListBox; +class QRadioButton; //================================================================================= // class : GroupGUI_GroupDlg @@ -93,7 +94,7 @@ private: QGroupBox* GroupMedium; QPushButton* mySelBtn; QLineEdit* myMainName; - QPushButton* mySelSubBtn; + QRadioButton* mySelSubBtn; QPushButton* mySelAllBtn; QPushButton* myAddBtn; QPushButton* myRemBtn; -- 2.39.2