diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-05-11 23:38:21 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-05-11 23:38:21 +0800 |
commit | 59304aa1b2c6d278e76f72509183fee96bbb8cae (patch) | |
tree | ad50b86aaf71497588372de7089ff71b05b00a7b /qmidiplayer-desktop/qmppresetselect.cpp | |
parent | d4c66cbcfb1411312b2c2f3c83e76a4882b8577a (diff) | |
download | QMidiPlayer-59304aa1b2c6d278e76f72509183fee96bbb8cae.tar.xz |
Fixed a crash caused by the visualization plugin.
Fixed a bug when piano is hidden but the option "arrange
channels on a stair" is enabled.
Add channel label display. However it's still buggy so it's
currently disabled.
Diffstat (limited to 'qmidiplayer-desktop/qmppresetselect.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmppresetselect.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp index ef67d70..2edb522 100644 --- a/qmidiplayer-desktop/qmppresetselect.cpp +++ b/qmidiplayer-desktop/qmppresetselect.cpp @@ -49,7 +49,7 @@ void qmpPresetSelector::setupWindow(int chid) plyr->getChannelPreset(chid,&b,&p,name); for(int i=0;i<ui->lwBankSelect->count();++i) { - sscanf(ui->lwBankSelect->item(i)->text().toStdString().c_str(),"%d",&r); + sscanf(ui->lwBankSelect->item(i)->text().toStdString().c_str(),"%3d",&r); if(r==b){ui->lwBankSelect->setCurrentRow(i);break;} } r=0; @@ -57,7 +57,7 @@ void qmpPresetSelector::setupWindow(int chid) for(int i=0,cr=0;i<128;++i) if(strlen(presets[b][i])) { - sprintf(name,"%d %s",i,presets[b][i]); + sprintf(name,"%03d %s",i,presets[b][i]); if(i==p)r=cr; ui->lwPresetSelect->addItem(name); cr++; @@ -94,7 +94,7 @@ void qmpPresetSelector::on_lwBankSelect_currentRowChanged() for(int i=0;i<128;++i) if(strlen(presets[b][i])) { - sprintf(name,"%d %s",i,presets[b][i]); + sprintf(name,"%03d %s",i,presets[b][i]); ui->lwPresetSelect->addItem(name); } } |