summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-09-23 13:01:57 +0000
committerFlorian Jung <flo@windfisch.org>2011-09-23 13:01:57 +0000
commit7ade50ecbd7dd851684f4e3e5bb5cb92fa1d9a15 (patch)
tree70020a51f9a4d739c9011837277feded5cd4acc4
parent6f6c78229e4e1dee80d36c89c27e2e58e23e0eb3 (diff)
made the "have to sometimes focus menu bar"-problem less annoying.
the menu bar is ONLY selected now when we switch to a non-MDI-subwin which shares tool- and menubar (because this is the only case where it's necessary) tiny indentation fix in dcanvas.cpp
-rw-r--r--muse2/muse/app.cpp10
-rw-r--r--muse2/muse/midiedit/dcanvas.cpp2
2 files changed, 9 insertions, 3 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 84b5121c..1fcfef56 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -3102,9 +3102,15 @@ void MusE::activeTopWinChangedSlot(TopWin* win)
{
if (MusEGlobal::debugMsg) printf("ACTIVE TOPWIN CHANGED to '%s' (%p)\n", win ? win->windowTitle().toAscii().data() : "<None>", win);
- if ((win==NULL) || (win->isMdiWin()==false))
+ if (win && (win->isMdiWin()==false) && win->sharesToolsAndMenu())
{
- if (MusEGlobal::debugMsg) printf(" that's out of the MDI area\n");
+ if (MusEGlobal::debugMsg) printf(" that's a menu sharing muse window which isn't inside the MDI area.\n");
+ // if a window gets active which a) is a muse window, b) is not a mdi subwin and c) shares menu- and toolbar,
+ // then unfocus the MDI area and/or the currently active MDI subwin. otherwise you'll be unable to use win's
+ // tools or menu entries, as whenever you click at them, they're replaced by the currently active MDI subwin's
+ // menus and toolbars.
+ // as unfocusing the MDI area and/or the subwin does not work for some reason, we must do this workaround:
+ // simply focus anything in the main window except the mdi area.
menuBar()->setFocus(Qt::MenuBarFocusReason);
}
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp
index 783a72f5..3f80133a 100644
--- a/muse2/muse/midiedit/dcanvas.cpp
+++ b/muse2/muse/midiedit/dcanvas.cpp
@@ -183,7 +183,7 @@ Undo DrumCanvas::moveCanvasItems(MusEWidget::CItemList& items, int dp, int dx, D
if (!forbidden)
{
- std::vector< MusEWidget::CItem* > doneList;
+ std::vector< MusEWidget::CItem* > doneList;
typedef std::vector< MusEWidget::CItem* >::iterator iDoneList;
for(MusEWidget::iCItem ici = items.begin(); ici != items.end(); ++ici)