diff options
author | Tim E. Real <termtech@rogers.com> | 2010-11-22 08:19:49 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-11-22 08:19:49 +0000 |
commit | ddbb19cf510a8d7d288575876005ea12775ef7d2 (patch) | |
tree | 5efec4e4b42a90689066c7aa84296e5a7747e5e0 /muse2/muse/app.cpp | |
parent | a2b0af5b4708a4468d85c0668a49a9e2dfcaeaab (diff) |
Delete main MusE object before returning from main.
Also make ClipList a child of it, so it deletes too.
Diffstat (limited to 'muse2/muse/app.cpp')
-rw-r--r-- | muse2/muse/app.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 502f97ef..f2c40020 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -3325,7 +3325,8 @@ void MusE::showDidYouKnowDialog() void MusE::startClipList(bool checked) { if (clipListEdit == 0) { - clipListEdit = new ClipListEdit(); + //clipListEdit = new ClipListEdit(); + clipListEdit = new ClipListEdit(this); toplevels.push_back(Toplevel(Toplevel::CLIPLIST, (unsigned long)(clipListEdit), clipListEdit)); connect(clipListEdit, SIGNAL(deleted(unsigned long)), SLOT(toplevelDeleted(unsigned long))); } @@ -3384,8 +3385,9 @@ void MusE::toplevelDeleted(unsigned long tl) case Toplevel::CLIPLIST: // ORCAN: This needs to be verified. aid2 used to correspond to Cliplist: //menu_audio->setItemChecked(aid2, false); - viewCliplistAction->setChecked(false); - return; + ///viewCliplistAction->setChecked(false); // Don't think we require this any more. Tim. + ///return; + break; // the followin editors can exist in more than // one instantiation: case Toplevel::PIANO_ROLL: @@ -3918,13 +3920,13 @@ int main(int argc, char* argv[]) #endif /* HAVE_LASH */ QTimer::singleShot(100, muse, SLOT(showDidYouKnowDialog())); - return app.exec(); - // p3.3.47 - //int rv = app.exec(); - // FIXME: Can't do, seg fault at MarkerView::~MarkerView() - // due to already deleted undoRedo. - //delete muse; - //return rv; + int rv = app.exec(); + if(debugMsg) + printf("app.exec() returned:%d\nDeleting main MusE object\n", rv); + delete muse; + if(debugMsg) + printf("Finished! Exiting main, return value:%d\n", rv); + return rv; } |