From 67a3c334727214115753e973432aba540424ecac Mon Sep 17 00:00:00 2001 From: Werner Schweer Date: Mon, 29 May 2006 15:01:21 +0000 Subject: fix abort exit operation --- muse/ChangeLog | 5 +++++ muse/muse/muse.cpp | 19 ++++++++++++++++--- muse/muse/muse.h | 1 + muse/muse/song.cpp | 3 +++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/muse/ChangeLog b/muse/ChangeLog index de998c1b..54ac170d 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,3 +1,8 @@ +29.5 (ws) + * the list of available software synthesizer in + edit->AddTrack->AddSoftSynth was always empty + * properly ignore close event in MusE::closeEvent() if the + user aborts operation 25.5 (ws) * remove automation buttons from midi track in arranger 25.5 (rj) diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index 398d456e..10432616 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -663,7 +663,9 @@ MusE::MusE() a->setData(CMD_DELETE_TRACK); addTrack = menuEdit->addMenu(*edit_track_addIcon, tr("Add Track")); - populateAddTrack(addTrack); + // delay creation of menu (at this moment the list of software + // synthesizer is empty): + connect(addTrack, SIGNAL(aboutToShow()), SLOT(aboutToShowAddTrack())); menuEdit->addSeparator(); select = menuEdit->addMenu(QIcon(*selectIcon), tr("Select")); @@ -1004,6 +1006,15 @@ MusE::MusE() song->blockSignals(false); } +//--------------------------------------------------------- +// aboutToShowAddTrack +//--------------------------------------------------------- + +void MusE::aboutToShowAddTrack() + { + populateAddTrack(addTrack); + } + //--------------------------------------------------------- // setRaster //--------------------------------------------------------- @@ -1349,7 +1360,7 @@ bool MusE::leaveProject() // closeEvent //--------------------------------------------------------- -void MusE::closeEvent(QCloseEvent*) +void MusE::closeEvent(QCloseEvent* event) { song->setStop(true); // @@ -1359,8 +1370,10 @@ void MusE::closeEvent(QCloseEvent*) qApp->processEvents(); } - if (leaveProject()) + if (leaveProject()) { + event->ignore(); return; + } seqStop(); diff --git a/muse/muse/muse.h b/muse/muse/muse.h index 7fe3742e..9921f96d 100644 --- a/muse/muse/muse.h +++ b/muse/muse/muse.h @@ -239,6 +239,7 @@ class MusE : public QMainWindow, public Ui::MuseBase void setRaster(int); void syncChanged(); void preferences(); + void aboutToShowAddTrack(); public slots: void bounceToFile(); diff --git a/muse/muse/song.cpp b/muse/muse/song.cpp index e50a423d..d987e734 100644 --- a/muse/muse/song.cpp +++ b/muse/muse/song.cpp @@ -1729,6 +1729,9 @@ void Song::insertTrack2(Track* track) case Track::MIDI_IN: _midiInPorts.push_back((MidiInPort*)track); break; + case Track::MIDI_CHANNEL: + _midiChannel.push_back((MidiChannel*)track); + break; case Track::WAVE: _waves.push_back((WaveTrack*)track); break; -- cgit v1.2.3