From 51efb7519fd6fee9717af2fcf2b4caa003b2b43d Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 18 Mar 2010 10:13:26 +0000 Subject: [PATCH] activated signal is not necessary now, it is enough to handle currentIndexChanged --- src/Qtx/QtxComboBox.cxx | 14 +++----------- src/Qtx/QtxComboBox.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/Qtx/QtxComboBox.cxx b/src/Qtx/QtxComboBox.cxx index 74425a788..f02d4d464 100755 --- a/src/Qtx/QtxComboBox.cxx +++ b/src/Qtx/QtxComboBox.cxx @@ -133,7 +133,6 @@ QtxComboBox::QtxComboBox( QWidget* parent ) : QComboBox( parent ), myCleared( false ) { - connect( this, SIGNAL( activated( int ) ), this, SLOT( onActivated( int ) ) ); connect( this, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onCurrentChanged( int ) ) ); setModel( new Model( this ) ); } @@ -235,16 +234,6 @@ void QtxComboBox::customEvent( QEvent* e ) lineEdit()->setText( "" ); } -/*! - \brief Called when any item is activated by the user. - \param idx activated item index -*/ -void QtxComboBox::onActivated( int idx ) -{ - resetClear(); - emit activatedId( id( idx ) ); -} - /*! \brief Called when current item is chaned (by the user or programmatically). \param idx item being set current @@ -252,7 +241,10 @@ void QtxComboBox::onActivated( int idx ) void QtxComboBox::onCurrentChanged( int idx ) { if ( idx != -1 ) + { resetClear(); + emit activatedId( id( idx ) ); + } } /*! diff --git a/src/Qtx/QtxComboBox.h b/src/Qtx/QtxComboBox.h index 345881b32..68748f8e2 100755 --- a/src/Qtx/QtxComboBox.h +++ b/src/Qtx/QtxComboBox.h @@ -61,7 +61,6 @@ signals: void activatedId( int ); private slots: - void onActivated( int ); void onCurrentChanged( int ); protected: -- 2.39.2