summaryrefslogtreecommitdiff
path: root/muse2/synti
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2010-11-25 02:43:43 +0000
committerTim E. Real <termtech@rogers.com>2010-11-25 02:43:43 +0000
commit4da5d9a1f93b275913019aa84fd74d06e35f6553 (patch)
treef42e9d4c515bc273155414d7578ed070260e8489 /muse2/synti
parent8d05535f533605d68931d1d0d8644377c1687920 (diff)
Fixed crash in FluidSynthGui::channelItemClicked(): Use item->row() for the channel.
Diffstat (limited to 'muse2/synti')
-rw-r--r--muse2/synti/fluidsynth/fluidsynthgui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/muse2/synti/fluidsynth/fluidsynthgui.cpp b/muse2/synti/fluidsynth/fluidsynthgui.cpp
index bb82fa92..d591ecb9 100644
--- a/muse2/synti/fluidsynth/fluidsynthgui.cpp
+++ b/muse2/synti/fluidsynth/fluidsynthgui.cpp
@@ -472,6 +472,7 @@ QString FluidSynthGui::getSoundFontName(int id)
void FluidSynthGui::channelItemClicked(QTableWidgetItem* item)
{
int col = item->column();
+ int row = item->row();
if (col == FS_SF_ID_COL) {
QMenu* popup = new QMenu(this);
@@ -522,7 +523,8 @@ void FluidSynthGui::channelItemClicked(QTableWidgetItem* item)
sfid = getSoundFontId(act->text());
fontname = getSoundFontName(sfid);
}
- byte channel = atoi(item->text().latin1()) - 1;
+ //byte channel = atoi(item->text().latin1()) - 1;
+ byte channel = row;
sendChannelChange(sfid, channel);
item->setText(fontname);
}
@@ -539,7 +541,8 @@ void FluidSynthGui::channelItemClicked(QTableWidgetItem* item)
yes->setData(1);
QAction * no = popup->addAction("No");
no->setData(0);
- byte channel = atoi(item->text().latin1()) - 1;
+ //byte channel = atoi(item->text().latin1()) - 1;
+ byte channel = row;
QAction * act2 = popup->exec(ppt, 0);
if (act2) {