diff options
author | Tim E. Real <termtech@rogers.com> | 2010-12-14 01:11:01 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-12-14 01:11:01 +0000 |
commit | 522ca271bfb851789aa437a5b88f980cb96916b2 (patch) | |
tree | b418f5dff1bdac80694f660ad81389e3f0853881 /muse2/muse/ctrl | |
parent | 466a93203ef2cccbf91316e28661aaa29f8a506e (diff) |
Please see ChangeLog.
Diffstat (limited to 'muse2/muse/ctrl')
-rw-r--r-- | muse2/muse/ctrl/ctrlpanel.cpp | 18 | ||||
-rw-r--r-- | muse2/muse/ctrl/ctrlpanel.h | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/muse2/muse/ctrl/ctrlpanel.cpp b/muse2/muse/ctrl/ctrlpanel.cpp index 37472b08..cdf3104d 100644 --- a/muse2/muse/ctrl/ctrlpanel.cpp +++ b/muse2/muse/ctrl/ctrlpanel.cpp @@ -69,7 +69,8 @@ CtrlPanel::CtrlPanel(QWidget* parent, MidiEditor* e, const char* name) selCtrl->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); selCtrl->setToolTip(tr("select controller")); - pop = new QMenu; + + ///pop = new QMenu; // destroy button QPushButton* destroy = new QPushButton(tr("X")); @@ -537,7 +538,8 @@ void CtrlPanel::ctrlPopup() int curDrumInstrument = editor->curDrumInstrument(); bool isDrum = track->type() == Track::DRUM; - pop->clear(); + QMenu* pop = new QMenu; + //pop->clear(); pop->addAction(tr("Velocity"))->setData(1); MidiCtrlValListList* cll = port->controller(); @@ -593,10 +595,15 @@ void CtrlPanel::ctrlPopup() selCtrl->setDown(false); if (!act) - return; - + { + delete pop; + return; + } + int rv = act->data().toInt(); QString s = act->text(); + delete pop; + if (rv == 1) { // special case velocity emit controllerChanged(CTRL_VELOCITY); } @@ -646,9 +653,10 @@ void CtrlPanel::ctrlPopup() } } } + delete pop1; } else { - QString s = act->text(); + ///QString s = act->text(); iMidiCtrlValList i = cll->begin(); for (; i != cll->end(); ++i) { MidiCtrlValList* cl = i->second; diff --git a/muse2/muse/ctrl/ctrlpanel.h b/muse2/muse/ctrl/ctrlpanel.h index 94746f49..a0e5f915 100644 --- a/muse2/muse/ctrl/ctrlpanel.h +++ b/muse2/muse/ctrl/ctrlpanel.h @@ -26,7 +26,7 @@ class MidiTrack; //--------------------------------------------------------- class CtrlPanel: public QWidget { - QMenu* pop; + ///QMenu* pop; QPushButton* selCtrl; MidiEditor* editor; |