diff options
author | Florian Jung <flo@windfisch.org> | 2011-08-18 16:03:23 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-08-18 16:03:23 +0000 |
commit | 3513555193d44fe99bc30dd3bf04701278a797a1 (patch) | |
tree | ec45e3a03dc8d60fe5cf2fccee52d1e9de4257bf /muse2/muse/app.cpp | |
parent | 1ff745b082d03e56f831cc8e2ada6a1943a45bcd (diff) |
"share tools and menu" can be set at runtime
added global settings for "default isMDI state" and "share..." (one default
for Subwins, one for free wins)
TODO: read and save them into configuration, add settings dialog for it
Diffstat (limited to 'muse2/muse/app.cpp')
-rw-r--r-- | muse2/muse/app.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index d3ad0e64..e48425d7 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1746,7 +1746,6 @@ void MusE::openInScoreEdit(ScoreEdit* destination, PartList* pl, bool allInOne) if (destination==NULL) // if no destination given, create a new one { destination = new ScoreEdit(this, 0, arranger->cursorValue()); - destination->shareToolsAndMenu(true); //FINDMICHJETZT destination->show(); toplevels.push_back(destination); connect(destination, SIGNAL(deleted(TopWin*)), SLOT(toplevelDeleted(TopWin*))); @@ -1782,7 +1781,6 @@ void MusE::startPianoroll(PartList* pl, bool showDefaultCtrls) { PianoRoll* pianoroll = new PianoRoll(pl, this, 0, arranger->cursorValue()); - pianoroll->shareToolsAndMenu(true); //FINDMICHJETZT if(showDefaultCtrls) // p4.0.12 pianoroll->addCtrl(); pianoroll->show(); @@ -3101,3 +3099,22 @@ void MusE::addMdiSubWindow(QMdiSubWindow* win) { mdiArea->addSubWindow(win); } + +void MusE::shareMenuAndToolbarChanged(TopWin* win, bool val) +{ + if (val) + { + if ((win == activeTopWin) && (win != currentMenuSharingTopwin)) + setCurrentMenuSharingTopwin(win); + } + else + { + if (win == currentMenuSharingTopwin) + { + if (win != activeTopWin) + setCurrentMenuSharingTopwin(activeTopWin); + else + setCurrentMenuSharingTopwin(NULL); + } + } +} |