call updateButtons() after model-change, use model()->value() rather than value()

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@678 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-01-26 08:52:19 +00:00
parent 3817dc7a78
commit 69893707b0
2 changed files with 11 additions and 1 deletions

View File

@@ -234,6 +234,7 @@ void automatableButtonGroup::modelChanged( void )
connect( model(), SIGNAL( dataChanged() ),
this, SLOT( updateButtons() ) );
autoModelView::modelChanged();
updateButtons();
}
@@ -244,7 +245,7 @@ void automatableButtonGroup::updateButtons( void )
int i = 0;
foreach( automatableButton * btn, m_buttons )
{
btn->model()->setValue( i == value() );
btn->model()->setValue( i == model()->value() );
++i;
}
}