]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
activated signal is not necessary now, it is enough to handle currentIndexChanged
authorasl <asl@opencascade.com>
Thu, 18 Mar 2010 10:13:26 +0000 (10:13 +0000)
committerasl <asl@opencascade.com>
Thu, 18 Mar 2010 10:13:26 +0000 (10:13 +0000)
src/Qtx/QtxComboBox.cxx
src/Qtx/QtxComboBox.h

index 74425a78848b0d77fbbf7e4a6e243bd2d9448514..f02d4d464a9fc29275c7d2c89ea6789bf6f7981f 100755 (executable)
@@ -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 ) );
+  }
 }
 
 /*!
index 345881b325350650496d3f2556808cd5568aa3be..68748f8e2fa6b3eb482f4fcab94c437ad30447b3 100755 (executable)
@@ -61,7 +61,6 @@ signals:
   void         activatedId( int );
 
 private slots:
-  void         onActivated( int );
   void         onCurrentChanged( int );
 
 protected: