summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog4
-rw-r--r--muse2/muse/app.cpp18
-rw-r--r--muse2/muse/arranger/arranger.h2
-rw-r--r--muse2/muse/arranger/pcanvas.cpp4
-rw-r--r--muse2/muse/arranger/tlist.cpp23
-rw-r--r--muse2/muse/arranger/trackinfo.cpp19
-rw-r--r--muse2/muse/ctrl/ctrlpanel.cpp18
-rw-r--r--muse2/muse/ctrl/ctrlpanel.h2
-rw-r--r--muse2/muse/instruments/editinstrument.cpp21
-rw-r--r--muse2/muse/instruments/editinstrument.h2
-rw-r--r--muse2/muse/liste/editevent.cpp31
-rw-r--r--muse2/muse/liste/editevent.h2
-rw-r--r--muse2/muse/liste/listedit.cpp7
-rw-r--r--muse2/muse/marker/markerview.cpp6
-rw-r--r--muse2/muse/marker/markerview.h4
-rw-r--r--muse2/muse/master/lmaster.cpp3
-rw-r--r--muse2/muse/midiedit/drumedit.cpp12
-rw-r--r--muse2/muse/mixer/rack.cpp8
-rw-r--r--muse2/muse/song.cpp32
-rw-r--r--muse2/synti/deicsonze/deicsonze.cpp22
-rw-r--r--muse2/synti/deicsonze/deicsonzegui.cpp3
-rw-r--r--muse2/synti/fluidsynth/fluidsynthgui.cpp1
22 files changed, 154 insertions, 90 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index af680887..65b0e6bf 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,5 +1,9 @@
13.12.2010:
- List the available locales in the --help output. (Orcan)
+ - Fixed audio/midi control right-click automation popups were greyed out due to typo. (Tim)
+ - Fixed some QMenu usages without parent and/or delete. (Tim)
+ - DeicsOnze: Fixed: Crash in ctor, _preset not init. by time loadConfiguration called. Re-arranged.
+ And 3 popup QMenu usages without delete. Test OK. (Tim)
12.12.2010:
- Integrated the translation system into cmake. Added a -DUPDATE_TRANSLATIONS flag to cmake
which will update the .ts files in the source tree with the newest strings. I used this to
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index e2748724..0f69754e 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -983,7 +983,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
connect(recordAction, SIGNAL(toggled(bool)), song, SLOT(setRecord(bool)));
panicAction = new QAction(QIcon(*panicIcon),
- tr("Panic"), 0);
+ tr("Panic"), this);
panicAction->setWhatsThis(tr(infoPanicButton));
connect(panicAction, SIGNAL(activated()), song, SLOT(panic()));
@@ -1004,7 +1004,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
fileOpenAction->setToolTip(tr(fileOpenText));
fileOpenAction->setWhatsThis(tr(fileOpenText));
- openRecent = new QMenu(tr("Open &Recent"));
+ openRecent = new QMenu(tr("Open &Recent"), this);
fileSaveAction = new QAction(QIcon(*saveIcon), tr("&Save"), this);
@@ -1033,9 +1033,9 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
editDeleteSelectedAction = new QAction(QIcon(*edit_track_delIcon), tr("Delete Selected Tracks"), this);
- addTrack = new QMenu(tr("Add Track"));
+ addTrack = new QMenu(tr("Add Track"), this);
addTrack->setIcon(QIcon(*edit_track_addIcon));
- select = new QMenu(tr("Select"));
+ select = new QMenu(tr("Select"), this);
select->setIcon(QIcon(*selectIcon));
editSelectAllAction = new QAction(QIcon(*select_allIcon), tr("Select &All"), this);
@@ -1050,12 +1050,12 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
startListEditAction = new QAction(QIcon(*edit_listIcon), tr("List"), this);
startWaveEditAction = new QAction(QIcon(*edit_waveIcon), tr("Wave"), this);
- master = new QMenu(tr("Mastertrack"));
+ master = new QMenu(tr("Mastertrack"), this);
master->setIcon(QIcon(*edit_mastertrackIcon));
masterGraphicAction = new QAction(QIcon(*mastertrack_graphicIcon),tr("Graphic"), this);
masterListAction = new QAction(QIcon(*mastertrack_listIcon),tr("List"), this);
- midiEdit = new QMenu(tr("Midi"));
+ midiEdit = new QMenu(tr("Midi"), this);
midiEdit->setIcon(QIcon(*edit_midiIcon));
midiTransposeAction = new QAction(QIcon(*midi_transposeIcon), tr("Transpose"), this);
@@ -1087,9 +1087,9 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
strCutEventsAction->setEnabled(false);
//-------- Midi Actions
- menuScriptPlugins = new QMenu(tr("&Plugins"));
+ menuScriptPlugins = new QMenu(tr("&Plugins"), this);
midiEditInstAction = new QAction(QIcon(*midi_edit_instrumentIcon), tr("Edit Instrument"), this);
- midiInputPlugins = new QMenu(tr("Input Plugins"));
+ midiInputPlugins = new QMenu(tr("Input Plugins"), this);
midiInputPlugins->setIcon(QIcon(*midi_inputpluginsIcon));
midiTrpAction = new QAction(QIcon(*midi_inputplugins_transposeIcon), tr("Transpose"), this);
midiInputTrfAction = new QAction(QIcon(*midi_inputplugins_midi_input_transformIcon), tr("Midi Input Transform"), this);
@@ -1117,7 +1117,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
//-------- Settings Actions
settingsGlobalAction = new QAction(QIcon(*settings_globalsettingsIcon), tr("Global Settings"), this);
settingsShortcutsAction = new QAction(QIcon(*settings_configureshortcutsIcon), tr("Configure shortcuts"), this);
- follow = new QMenu(tr("follow song"));
+ follow = new QMenu(tr("follow song"), this);
dontFollowAction = new QAction(tr("dont follow Song"), this);
dontFollowAction->setCheckable(true);
followPageAction = new QAction(tr("follow page"), this);
diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h
index a642c7a8..fa4bb06b 100644
--- a/muse2/muse/arranger/arranger.h
+++ b/muse2/muse/arranger/arranger.h
@@ -98,7 +98,7 @@ class Arranger : public QWidget {
QToolButton* ib;
int trackInfoType;
Splitter* split;
- QMenu* pop;
+ ///QMenu* pop;
int songType;
PosLabel* cursorPos;
SpinBox* globalTempoSpinBox;
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index d67eaf99..1e7e323a 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -750,8 +750,8 @@ QMenu* PartCanvas::genItemPopup(CItem* item)
partPopup->addSeparator();
QAction *act_rename = partPopup->addAction(tr("rename"));
act_rename->setData(0);
- QMenu* colorPopup = new QMenu(tr("color"));
- partPopup->addMenu(colorPopup);
+
+ QMenu* colorPopup = partPopup->addMenu(tr("color"));
// part color selection
//const QFontMetrics& fm = colorPopup->fontMetrics();
diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp
index da4ad9ce..c7c225d3 100644
--- a/muse2/muse/arranger/tlist.cpp
+++ b/muse2/muse/arranger/tlist.cpp
@@ -591,23 +591,23 @@ void TList::oportPropertyPopupMenu(Track* t, int x, int y)
QMenu* p = new QMenu;
QAction* act = p->addAction(tr("Show Gui"));
act->setCheckable(true);
- printf("synth hasgui %d, gui visible %d\n",synth->hasGui(), synth->guiVisible());
+ //printf("synth hasgui %d, gui visible %d\n",synth->hasGui(), synth->guiVisible());
act->setEnabled(synth->hasGui());
act->setChecked(synth->guiVisible());
+ // If it has a gui but we don't have OSC, disable the action.
#ifndef OSC_SUPPORT
#ifdef DSSI_SUPPORT
if(dynamic_cast<DssiSynthIF*>(synth->sif()))
{
- printf("entering this wierd if statement\n");
- p->setItemChecked(0, false);
- p->setItemEnabled(0, false);
+ act->setChecked(false);
+ act->setEnabled(false);
}
#endif
#endif
- act = p->exec(mapToGlobal(QPoint(x, y)), 0);
- if (act) {
+ QAction* ract = p->exec(mapToGlobal(QPoint(x, y)), 0);
+ if (ract == act) {
bool show = !synth->guiVisible();
audio->msgShowInstrumentGui(synth, show);
}
@@ -624,10 +624,11 @@ void TList::oportPropertyPopupMenu(Track* t, int x, int y)
QMenu* p = new QMenu;
QAction* act = p->addAction(tr("Show Gui"));
act->setCheckable(true);
- printf("synth hasgui %d, gui visible %d\n",port->hasGui(), port->guiVisible());
+ //printf("synth hasgui %d, gui visible %d\n",port->hasGui(), port->guiVisible());
act->setEnabled(port->hasGui());
act->setChecked(port->guiVisible());
+ // If it has a gui but we don't have OSC, disable the action.
#ifndef OSC_SUPPORT
#ifdef DSSI_SUPPORT
MidiDevice* dev = port->device();
@@ -639,8 +640,8 @@ void TList::oportPropertyPopupMenu(Track* t, int x, int y)
#endif
#endif
- act = p->exec(mapToGlobal(QPoint(x, y)), 0);
- if (act) {
+ QAction* ract = p->exec(mapToGlobal(QPoint(x, y)), 0);
+ if (ract == act) {
bool show = !port->guiVisible();
audio->msgShowInstrumentGui(port->instrument(), show);
}
@@ -783,7 +784,7 @@ void TList::mousePressEvent(QMouseEvent* ev)
if (t == 0) {
if (button == Qt::RightButton) {
QMenu* p = new QMenu;
- p->clear();
+ //p->clear();
QAction* midi = p->addAction(*addtrack_addmiditrackIcon,
tr("Add Midi Track"));
midi->setData(Track::MIDI);
@@ -994,7 +995,7 @@ void TList::mousePressEvent(QMouseEvent* ev)
else if (button == Qt::RightButton) {
mode = NORMAL;
QMenu* p = new QMenu;
- p->clear();
+ //p->clear();
p->addAction(QIcon(*automation_clear_dataIcon), tr("Delete Track"))->setData(0); // ddskrjo
p->addAction(QIcon(*track_commentIcon), tr("Track Comment"))->setData(1);
QAction* act = p->exec(ev->globalPos(), 0);
diff --git a/muse2/muse/arranger/trackinfo.cpp b/muse2/muse/arranger/trackinfo.cpp
index 18589e82..e1c8047e 100644
--- a/muse2/muse/arranger/trackinfo.cpp
+++ b/muse2/muse/arranger/trackinfo.cpp
@@ -990,17 +990,28 @@ void Arranger::instrPopup()
int channel = track->outChannel();
int port = track->outPort();
MidiInstrument* instr = midiPorts[port].instrument();
- instr->populatePatchPopup(pop, channel, song->mtype(), track->type() == Track::DRUM);
+ QMenu* pup = new QMenu;
+ ///instr->populatePatchPopup(pop, channel, song->mtype(), track->type() == Track::DRUM);
+ instr->populatePatchPopup(pup, channel, song->mtype(), track->type() == Track::DRUM);
- if(pop->actions().count() == 0)
+ ///if(pop->actions().count() == 0)
+ /// return;
+ if(pup->actions().count() == 0)
+ {
+ delete pup;
return;
- QAction *act = pop->exec(midiTrackInfo->iPatch->mapToGlobal(QPoint(10,5)));
+ }
+
+ ///QAction *act = pop->exec(midiTrackInfo->iPatch->mapToGlobal(QPoint(10,5)));
+ QAction *act = pup->exec(midiTrackInfo->iPatch->mapToGlobal(QPoint(10,5)));
if (act) {
int rv = act->data().toInt();
MidiPlayEvent ev(0, port, channel, ME_CONTROLLER, CTRL_PROGRAM, rv);
audio->msgPlayMidiEvent(&ev);
updateTrackInfo(-1);
}
+
+ delete pup;
}
//---------------------------------------------------------
@@ -1228,7 +1239,7 @@ void Arranger::genMidiTrackInfo()
connect(midiTrackInfo->iPatch, SIGNAL(released()), SLOT(instrPopup()));
- pop = new QMenu(midiTrackInfo->iPatch);
+ ///pop = new QMenu(midiTrackInfo->iPatch);
//pop->setCheckable(false); // not needed in Qt4
// Removed by Tim. p3.3.9
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;
diff --git a/muse2/muse/instruments/editinstrument.cpp b/muse2/muse/instruments/editinstrument.cpp
index 2fa1f0c9..a0aba89c 100644
--- a/muse2/muse/instruments/editinstrument.cpp
+++ b/muse2/muse/instruments/editinstrument.cpp
@@ -48,7 +48,7 @@ EditInstrument::EditInstrument(QWidget* parent, Qt::WFlags fl)
toolBar->addAction(QWhatsThis::createAction(this));
Help->addAction(QWhatsThis::createAction(this));
- patchpopup = new QMenu(patchButton);
+ ///patchpopup = new QMenu(patchButton);
//patchpopup->setCheckable(false);// Qt4 doc says this is unnecessary.
// populate instrument list
@@ -1435,14 +1435,16 @@ void EditInstrument::patchButtonClicked()
//int port = track->outPort();
//MidiInstrument* instr = midiPorts[port].instrument();
- patchpopup->clear();
+ //patchpopup->clear();
+ QMenu* patchpopup = new QMenu;
+
PatchGroupList* pg = workingInstrument.groups();
if (pg->size() > 1) {
for (ciPatchGroup i = pg->begin(); i != pg->end(); ++i) {
PatchGroup* pgp = *i;
- QMenu* pm = new QMenu(pgp->name);
+ QMenu* pm = patchpopup->addMenu(pgp->name);
//pm->setCheckable(false);//Qt4 doc says this is unnecessary
pm->setFont(config.fonts[0]);
const PatchList& pl = pgp->patches;
@@ -1460,7 +1462,6 @@ void EditInstrument::patchButtonClicked()
// }
}
- patchpopup->addMenu(pm);
}
}
else if (pg->size() == 1 ){
@@ -1478,10 +1479,20 @@ void EditInstrument::patchButtonClicked()
}
if(patchpopup->actions().count() == 0)
+ {
+ delete patchpopup;
return;
-
+ }
+
QAction* act = patchpopup->exec(patchButton->mapToGlobal(QPoint(10,5)));
+ if(!act)
+ {
+ delete patchpopup;
+ return;
+ }
+
int rv = act->data().toInt();
+ delete patchpopup;
if (rv != -1)
{
diff --git a/muse2/muse/instruments/editinstrument.h b/muse2/muse/instruments/editinstrument.h
index b200e326..62ad389e 100644
--- a/muse2/muse/instruments/editinstrument.h
+++ b/muse2/muse/instruments/editinstrument.h
@@ -44,7 +44,7 @@ class EditInstrument : public QMainWindow, public Ui::EditInstrumentBase {
void setDefaultPatchControls(int);
const char* getPatchName(int);
void deleteInstrument(QListWidgetItem*);
- QMenu* patchpopup;
+ ///QMenu* patchpopup;
private slots:
virtual void fileNew();
diff --git a/muse2/muse/liste/editevent.cpp b/muse2/muse/liste/editevent.cpp
index 9921c2cd..efcb8e84 100644
--- a/muse2/muse/liste/editevent.cpp
+++ b/muse2/muse/liste/editevent.cpp
@@ -593,7 +593,7 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,
val = event.dataB();
}
- pop = new QMenu(this);
+ ///pop = new QMenu(this);
//pop->setCheckable(false);//not necessary in Qt4
MidiTrack* track = part->track();
@@ -677,8 +677,8 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,
void EditCtrlDialog::newController()
{
- QMenu* pop = new QMenu(this);
- //pop->setCheckable(this);//not necessary in Qt4
+ QMenu* pup = new QMenu(this);
+ //pup->setCheckable(this);//not necessary in Qt4
//
// populate popup with all controllers available for
// current instrument
@@ -696,12 +696,12 @@ void EditCtrlDialog::newController()
{
if(cll->find(channel, ci->second->num()) == cll->end())
{
- QAction* act = pop->addAction(ci->second->name());
+ QAction* act = pup->addAction(ci->second->name());
act->setData(nn);
++nn;
}
}
- QAction* rv = pop->exec(buttonNewController->mapToGlobal(QPoint(0,0)));
+ QAction* rv = pup->exec(buttonNewController->mapToGlobal(QPoint(0,0)));
if (rv) {
QString s = rv->text();
for (iMidiController ci = mcl->begin(); ci != mcl->end(); ++ci) {
@@ -733,7 +733,7 @@ void EditCtrlDialog::newController()
}
}
}
- delete pop;
+ delete pup;
}
//---------------------------------------------------------
// ctrlListClicked
@@ -841,16 +841,27 @@ void EditCtrlDialog::instrPopup()
int channel = track->outChannel();
int port = track->outPort();
MidiInstrument* instr = midiPorts[port].instrument();
- instr->populatePatchPopup(pop, channel, song->mtype(), track->type() == Track::DRUM);
+
+ ///instr->populatePatchPopup(pop, channel, song->mtype(), track->type() == Track::DRUM);
+ QMenu* pup = new QMenu(this);
+ instr->populatePatchPopup(pup, channel, song->mtype(), track->type() == Track::DRUM);
- if(pop->actions().count() == 0)
+ ///if(pop->actions().count() == 0)
+ /// return;
+ if(pup->actions().count() == 0)
+ {
+ delete pup;
return;
- QAction* rv = new QAction(pop->exec(patchName->mapToGlobal(QPoint(10,5))));
+ }
+
+ ///QAction* rv = pop->exec(patchName->mapToGlobal(QPoint(10,5)));
+ QAction* rv = pup->exec(patchName->mapToGlobal(QPoint(10,5)));
if (rv) {
val = rv->data().toInt();
updatePatch();
}
- delete rv;
+
+ delete pup;
}
//---------------------------------------------------------
diff --git a/muse2/muse/liste/editevent.h b/muse2/muse/liste/editevent.h
index bff39181..454e6a69 100644
--- a/muse2/muse/liste/editevent.h
+++ b/muse2/muse/liste/editevent.h
@@ -94,7 +94,7 @@ class EditCtrlDialog : public QDialog, public Ui::EditCtrlBase {
int val; // controller value (for prog. changes)
const MidiPart* part;
- QMenu* pop;
+ ///QMenu* pop;
void updatePatch();
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index 7df2c8bf..aeb6eb99 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -430,16 +430,11 @@ ListEdit::ListEdit(PartList* pl)
//---------Pulldown Menu----------------------------
- menuEdit = new QMenu(tr("&Edit"));
QSignalMapper *editSignalMapper = new QSignalMapper(this);
- menuBar()->addMenu(menuEdit);
+ menuEdit = menuBar()->addMenu(tr("&Edit"));
menuEdit->addActions(undoRedo->actions());
- ///Q3Accel* qa = new Q3Accel(this);
- ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
- ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
-
menuEdit->addSeparator();
#if 0
QAction *cutAction = menuEdit->addAction(QIcon(*editcutIconSet), tr("Cut"));
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index ab976911..dd4a5a69 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -164,8 +164,8 @@ MarkerView::MarkerView(QWidget* parent)
QMenu* fileMenu = new QMenu(tr("&File"));
menuBar()->addMenu(fileMenu);
*/
- QMenu* editMenu = new QMenu(tr("&Edit"));
- menuBar()->addMenu(editMenu);
+ QMenu* editMenu = menuBar()->addMenu(tr("&Edit"));
+
editMenu->addAction(markerAdd);
editMenu->addAction(markerDelete);
@@ -274,7 +274,7 @@ MarkerView::MarkerView(QWidget* parent)
MarkerView::~MarkerView()
{
- //printf("MarkerView::~MarkerView() before undoRedo->removeFrom(tools)\n");
+ //printf("MarkerView::~MarkerView() before undoRedo->removeFrom(tools)\n");
// undoRedo->removeFrom(tools); // p4.0.6 Removed
}
diff --git a/muse2/muse/marker/markerview.h b/muse2/muse/marker/markerview.h
index ff140a13..a271873c 100644
--- a/muse2/muse/marker/markerview.h
+++ b/muse2/muse/marker/markerview.h
@@ -57,7 +57,7 @@ class MarkerView : public TopWin {
Awl::PosEdit* editTick;
QToolButton* lock;
QToolBar* tools;
-
+
Q_OBJECT
virtual void closeEvent(QCloseEvent*);
@@ -73,7 +73,7 @@ class MarkerView : public TopWin {
void clicked(QTreeWidgetItem*);
void updateList();
void songChanged(int);
-
+
signals:
void deleted(unsigned long);
void closed();
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index c9a94167..232b9672 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -69,9 +69,8 @@ LMaster::LMaster()
setFixedWidth(400);
//---------Pulldown Menu----------------------------
- menuEdit = new QMenu(tr("&Edit"));
+ menuEdit = menuBar()->addMenu(tr("&Edit"));
QSignalMapper *signalMapper = new QSignalMapper(this);
- menuBar()->addMenu(menuEdit);
menuEdit->addActions(undoRedo->actions());
menuEdit->addSeparator();
tempoAction = menuEdit->addAction(tr("Insert Tempo"));
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index bd1a55eb..bc5caca6 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -154,8 +154,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
QSignalMapper *signalMapper = new QSignalMapper(this);
//---------Pulldown Menu----------------------------
- menuFile = new QMenu(tr("&File"));
- menuBar()->addMenu(menuFile);
+ menuFile = menuBar()->addMenu(tr("&File"));
loadAction = menuFile->addAction(QIcon(*openIcon), tr("Load Map"));
saveAction = menuFile->addAction(QIcon(*saveIcon), tr("Save Map"));
@@ -169,8 +168,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
signalMapper->setMapping(saveAction, DrumCanvas::CMD_SAVE);
signalMapper->setMapping(resetAction, DrumCanvas::CMD_RESET);
- menuEdit = new QMenu(tr("&Edit"));
- menuBar()->addMenu(menuEdit);
+ menuEdit = menuBar()->addMenu(tr("&Edit"));
menuEdit->addActions(undoRedo->actions());
menuEdit->addSeparator();
@@ -221,8 +219,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
signalMapper->setMapping(nextAction, DrumCanvas::CMD_SELECT_NEXT_PART);
// Functions
- menuFunctions = new QMenu(tr("&Functions"));
- menuBar()->addMenu(menuFunctions);
+ menuFunctions = menuBar()->addMenu(tr("&Functions"));
menuFunctions->setTearOffEnabled(true);
@@ -235,9 +232,8 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
signalMapper->setMapping(fixedAction, DrumCanvas::CMD_FIXED_LEN);
signalMapper->setMapping(veloAction, DrumCanvas::CMD_MODIFY_VELOCITY);
- QMenu* menuScriptPlugins = new QMenu(tr("&Plugins"));
+ QMenu* menuScriptPlugins = menuBar()->addMenu(tr("&Plugins"));
song->populateScriptMenu(menuScriptPlugins, this);
- menuBar()->addMenu(menuScriptPlugins);
connect(signalMapper, SIGNAL(mapped(int)), SLOT(cmd(int)));
diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp
index e7f72714..2bbed787 100644
--- a/muse2/muse/mixer/rack.cpp
+++ b/muse2/muse/mixer/rack.cpp
@@ -236,8 +236,14 @@ void EffectRack::menuRequested(QListWidgetItem* it)
//delete menu;
if (!act)
- return;
+ {
+ delete menu;
+ return;
+ }
+
int sel = act->data().toInt();
+ delete menu;
+
switch(sel) {
case NEW:
{
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index 92135e16..435756e5 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -2437,6 +2437,7 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a
//menu->setItemEnabled(HEADER, false);
//MenuTitleItem* title = new MenuTitleItem(tr("Automation:")); ddskrjo
//menu->insertItem(title, HEADER, HEADER); ddskrjo
+ menu->addAction(new MenuTitleItem(tr("Automation:"), menu));
//menu->insertSeparator(SEP1);
@@ -2451,7 +2452,7 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a
//menu->insertSeparator(SEP2);
menu->addSeparator();
- QAction* addEvent = new QAction(this);
+ QAction* addEvent = new QAction(menu);
menu->addAction(addEvent);
if(isEvent)
addEvent->setText(tr("set event"));
@@ -2462,7 +2463,7 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a
QAction* eraseEventAction = menu->addAction(tr("erase event"));
eraseEventAction->setData(CLEAR_EVENT);
- menu->setEnabled(isEvent);
+ eraseEventAction->setEnabled(isEvent);
QAction* eraseRangeAction = menu->addAction(tr("erase range"));
eraseRangeAction->setData(CLEAR_RANGE);
@@ -2474,13 +2475,18 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a
QAction* act = menu->exec(menupos);
//delete menu;
- if (!act)
+ if (!act || !track)
+ {
+ delete menu;
return -1;
+ }
- if(!track)
- return -1;
+ //if(!track)
+ // return -1;
int sel = act->data().toInt();
+ delete menu;
+
switch(sel)
{
case ADD_EVENT:
@@ -2513,9 +2519,8 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a
return -1;
break;
}
+
return sel;
-
- return 0;
}
//---------------------------------------------------------
@@ -2630,7 +2635,7 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo
// menu->insertSeparator(SEP2);
- QAction* addEvent = new QAction(this);
+ QAction* addEvent = new QAction(menu);
menu->addAction(addEvent);
if(isEvent)
addEvent->setText(tr("set event"));
@@ -2642,7 +2647,7 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo
QAction* eraseEventAction = menu->addAction(tr("erase event"));
eraseEventAction->setData(CLEAR_EVENT);
- menu->setEnabled(isEvent);
+ eraseEventAction->setEnabled(isEvent);
// menu->insertItem(tr("erase range"), CLEAR_RANGE, CLEAR_RANGE);
// menu->setItemEnabled(CLEAR_RANGE, canEraseRange);
@@ -2654,12 +2659,17 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo
QAction* act = menu->exec(menupos);
//delete menu;
if (!act)
+ {
+ delete menu;
return -1;
-
+ }
+
//if(!part)
// return -1;
int sel = act->data().toInt();
+ delete menu;
+
switch(sel)
{
case ADD_EVENT:
@@ -2739,8 +2749,6 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo
}
return sel;
-
- return 0;
}
//---------------------------------------------------------
diff --git a/muse2/synti/deicsonze/deicsonze.cpp b/muse2/synti/deicsonze/deicsonze.cpp
index 5ab39ee8..131a1742 100644
--- a/muse2/synti/deicsonze/deicsonze.cpp
+++ b/muse2/synti/deicsonze/deicsonze.cpp
@@ -160,6 +160,14 @@ DeicsOnze::DeicsOnze() : Mess(2) {
_reverbFilter = new LowFilter();
_delayFilter = new LowFilter();
+ // Moved here from below due to crash - _preset not initialized when loadConfiguration called. Tim.
+ _initialPreset = new
+ Preset(new Subcategory(new Category(NULL, "NONE", 0), "NONE", 0), 0);
+ for(int c = 0; c < NBRCHANNELS; c++) {
+ _preset[c]=_initialPreset;
+ setPreset(c);
+ }
+
//Load configuration
QString defaultConf =
(QString(getenv("HOME")) + QString("/." DEICSONZESTR ".dco"));
@@ -176,12 +184,14 @@ DeicsOnze::DeicsOnze() : Mess(2) {
//loadSutulaPresets();
- _initialPreset = new
- Preset(new Subcategory(new Category(NULL, "NONE", 0), "NONE", 0), 0);
- for(int c = 0; c < NBRCHANNELS; c++) {
- _preset[c]=_initialPreset;
- setPreset(c);
- }
+ // Moved above due to crash - _preset not initialized when loadConfiguration called. Tim.
+ //_initialPreset = new
+ // Preset(new Subcategory(new Category(NULL, "NONE", 0), "NONE", 0), 0);
+ //for(int c = 0; c < NBRCHANNELS; c++) {
+ // _preset[c]=_initialPreset;
+ // setPreset(c);
+ //}
+
//update display gui
//update mastervol
unsigned char dataMasterVol[2];
diff --git a/muse2/synti/deicsonze/deicsonzegui.cpp b/muse2/synti/deicsonze/deicsonzegui.cpp
index 4bdf0205..ba038b1b 100644
--- a/muse2/synti/deicsonze/deicsonzegui.cpp
+++ b/muse2/synti/deicsonze/deicsonzegui.cpp
@@ -1851,6 +1851,7 @@ void DeicsOnzeGui::categoryPopupMenu(const QPoint&) {
categoryMenu->addAction(tr("Delete set"),
this, SLOT(deleteSetDialog()));;
categoryMenu->exec(QCursor::pos());
+ delete categoryMenu; // Tim.
}
void DeicsOnzeGui::subcategoryPopupMenu(const QPoint&) {
QTreeWidgetItem* sub = subcategoryListView->currentItem();
@@ -1877,6 +1878,7 @@ void DeicsOnzeGui::subcategoryPopupMenu(const QPoint&) {
loadItem->setEnabled(false);
}
subcategoryMenu->exec(QCursor::pos());
+ delete subcategoryMenu; // Tim.
}
void DeicsOnzeGui::presetPopupMenu(const QPoint&) {
QTreeWidgetItem* pre = presetListView->currentItem();
@@ -1899,6 +1901,7 @@ void DeicsOnzeGui::presetPopupMenu(const QPoint&) {
loadItem->setEnabled(false);
}
presetMenu->exec(QCursor::pos());
+ delete presetMenu; // Tim.
}
//-----------------------------------------------------------
diff --git a/muse2/synti/fluidsynth/fluidsynthgui.cpp b/muse2/synti/fluidsynth/fluidsynthgui.cpp
index 18d5df59..343391f8 100644
--- a/muse2/synti/fluidsynth/fluidsynthgui.cpp
+++ b/muse2/synti/fluidsynth/fluidsynthgui.cpp
@@ -554,6 +554,7 @@ void FluidSynthGui::channelItemClicked(QTableWidgetItem* item)
item->setText(index == 0 ? "No" : "Yes" );
}
}
+ delete popup;
}
}