diff --git a/ChangeLog b/ChangeLog index c4f42d942..d4c072ed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-07 Tobias Doerffel + + * src/gui/widgets/combobox.cpp: + set correct value for model when selecting an item whose strings + occurs multiple times in the combobox + 2008-04-06 Tobias Doerffel * include/effect_select_dialog.h: diff --git a/src/gui/widgets/combobox.cpp b/src/gui/widgets/combobox.cpp index c56315912..bec206e7d 100644 --- a/src/gui/widgets/combobox.cpp +++ b/src/gui/widgets/combobox.cpp @@ -127,10 +127,12 @@ void comboBox::mousePressEvent( QMouseEvent * _me ) m_menu.clear(); for( int i = 0; i < model()->size(); ++i ) { - m_menu.addAction( model()->itemPixmap( i ) ? + QAction * a = m_menu.addAction( + model()->itemPixmap( i ) ? *model()->itemPixmap( i ) : QPixmap(), model()->itemText( i ) ); + a->setData( i ); } QPoint gpos = mapToGlobal( QPoint( 0, height() ) ); @@ -245,7 +247,7 @@ void comboBox::deletePixmap( QPixmap * _pixmap ) void comboBox::setItem( QAction * _item ) { - model()->setInitValue( model()->findText( _item->text() ) ); + model()->setInitValue( _item->data().toInt() ); }