summaryrefslogtreecommitdiff
path: root/muse2/muse/liste
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-05-19 07:43:06 +0000
committerTim E. Real <termtech@rogers.com>2011-05-19 07:43:06 +0000
commit0f3ed66e83d6639452a5aa219b9a6bf2bfd54897 (patch)
tree950c324e7301f657cba543d8ccbb268ca40e418f /muse2/muse/liste
parent0792c2ec66dacfff10899cbe171cb661871617f1 (diff)
Popup menus now auto-scroll if too large to fit on desktop.
Midi track info patch popup now stays open for auditioning patches. Editor 'ctrl' controller popups: Split instrument/other (+ common controls!) + show ctrl numbers.
Diffstat (limited to 'muse2/muse/liste')
-rw-r--r--muse2/muse/liste/editevent.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/muse2/muse/liste/editevent.cpp b/muse2/muse/liste/editevent.cpp
index b162a3e6..0643c34d 100644
--- a/muse2/muse/liste/editevent.cpp
+++ b/muse2/muse/liste/editevent.cpp
@@ -36,6 +36,7 @@
#include "midiedit/drummap.h"
#include "instruments/minstrument.h"
#include "midi.h"
+#include "popupmenu.h"
//---------------------------------------------------------
// string2qhex
@@ -715,7 +716,9 @@ void EditCtrlDialog::newController()
cll->add(channel, vl);
//song->update(SC_MIDI_CONTROLLER_ADD);
}
- for (int idx = 0; ;++idx) {
+ //for (int idx = 0; ;++idx) {
+ int idx = 0;
+ for (; idx < ctrlList->count() ;++idx) { // p4.0.25 Fix segfault
QString str = ctrlList->item(idx)->text();
if (s == str)
{
@@ -723,14 +726,21 @@ void EditCtrlDialog::newController()
ctrlListClicked(ctrlList->item(idx));
break;
}
- if (str.isNull()) {
- ctrlList->addItem(s);
- ctrlList->item(idx)->setSelected(true);
- ctrlListClicked(ctrlList->item(idx));
- break;
- }
+ //if (str.isNull()) {
+ // ctrlList->addItem(s);
+ // ctrlList->item(idx)->setSelected(true);
+ // ctrlListClicked(ctrlList->item(idx));
+ // break;
+ // }
+ }
+ if (idx >= ctrlList->count()) { // p4.0.25 Fix segfault
+ ctrlList->addItem(s);
+ ctrlList->item(idx)->setSelected(true);
+ ctrlListClicked(ctrlList->item(idx));
+ break;
}
+
break;
}
}
@@ -844,7 +854,8 @@ void EditCtrlDialog::instrPopup()
MidiInstrument* instr = midiPorts[port].instrument();
///instr->populatePatchPopup(pop, channel, song->mtype(), track->type() == Track::DRUM);
- QMenu* pup = new QMenu(this);
+ //QMenu* pup = new QMenu(this);
+ PopupMenu* pup = new PopupMenu(this);
instr->populatePatchPopup(pup, channel, song->mtype(), track->type() == Track::DRUM);
///if(pop->actions().count() == 0)