set correct value for model when selecting an item whose strings occurs multiple times in the combobox
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@894 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-04-07 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* 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 <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* include/effect_select_dialog.h:
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user