diff options
author | Werner Schweer <ws.seh.de> | 2006-05-29 15:01:21 +0000 |
---|---|---|
committer | Werner Schweer <ws.seh.de> | 2006-05-29 15:01:21 +0000 |
commit | 67a3c334727214115753e973432aba540424ecac (patch) | |
tree | 2f2b70143bed0cf932d3067a7db300c8b8a15726 | |
parent | 170f94f399466d741f5fd44da466e7a9a33cf6ff (diff) |
fix abort exit operation
-rw-r--r-- | muse/ChangeLog | 5 | ||||
-rw-r--r-- | muse/muse/muse.cpp | 19 | ||||
-rw-r--r-- | muse/muse/muse.h | 1 | ||||
-rw-r--r-- | 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")); @@ -1005,6 +1007,15 @@ MusE::MusE() } //--------------------------------------------------------- +// 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; |