From 4da5d9a1f93b275913019aa84fd74d06e35f6553 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Thu, 25 Nov 2010 02:43:43 +0000 Subject: Fixed crash in FluidSynthGui::channelItemClicked(): Use item->row() for the channel. --- muse2/ChangeLog | 1 + muse2/synti/fluidsynth/fluidsynthgui.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'muse2') diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 4400d67b..a4c52d0c 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -11,6 +11,7 @@ - Removed patchbaybase from the project (Orcan) - Added ENABLE_EXPERIMENTAL flag to cmake. Marked rhythmbase, s1 experimental (Orcan) - Fixed a connection in miditransform (Orcan) + - Fixed crash in FluidSynthGui::channelItemClicked(): Use item->row() for the channel. Test OK. (Tim) 23.11.2010 - Added Track::cname(), applied to strip labels' object names, so they may be used in style sheets. (Tim) - Added struct SysEx and some friends, to minstrument.h, prep. for the instrument editor. (Tim) 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) { -- cgit v1.2.3