summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-08-21 18:52:05 +0000
committerFlorian Jung <flo@windfisch.org>2011-08-21 18:52:05 +0000
commit6aa5a11e56b977c26cb4e108e23ed191160ba801 (patch)
treed44138a4d6c4740732e0b5c36a4d5d28ea67495c
parent74ef94afca796f9cdd2fe9b5eba0c60c3c9150d3 (diff)
automatic maximizing for arranger when in traditional SDI mode
-rw-r--r--muse2/muse/app.cpp19
-rw-r--r--muse2/muse/cobject.cpp3
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp4
3 files changed, 26 insertions, 0 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 16b91d17..69e4525a 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -885,6 +885,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
mdiArea=new QMdiArea(this);
+ mdiArea->setOption(QMdiArea::DontMaximizeSubWindowOnActivation);
setCentralWidget(mdiArea);
connect(windowsTileAction, SIGNAL(activated()), mdiArea, SLOT(tileSubWindows()));
connect(windowsCascadeAction, SIGNAL(activated()), mdiArea, SLOT(cascadeSubWindows()));
@@ -1280,6 +1281,24 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll
showMarker(config.markerVisible);
}
+ if (songTemplate)
+ {
+ // maximize the arranger in traditional SDI mode
+ if (TopWin::_defaultSubwin[TopWin::ARRANGER])
+ {
+ bool maximizeArranger=true;
+ for (int i=0; i<TopWin::TOPLEVELTYPE_LAST_ENTRY; i++)
+ if ((i!=TopWin::ARRANGER) && TopWin::_defaultSubwin[i])
+ {
+ maximizeArranger=false;
+ break;
+ }
+
+ if (maximizeArranger)
+ arrangerView->showMaximized();
+ }
+ }
+
}
//---------------------------------------------------------
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index 7b5b4cb6..bebbf310 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -186,6 +186,7 @@ void TopWin::setIsMdiWin(bool val)
QMdiSubWindow* subwin = createMdiWrapper();
muse->addMdiSubWindow(subwin);
subwin->setVisible(vis);
+ this->QMainWindow::show(); //bypass the delegation to the subwin
if (_sharesToolsAndMenu == _sharesWhenFree[_type])
shareToolsAndMenu(_sharesWhenSubwin[_type]);
@@ -241,6 +242,8 @@ void TopWin::addToolBar(QToolBar* toolbar)
if (!_sharesToolsAndMenu)
QMainWindow::addToolBar(toolbar);
+ else
+ toolbar->hide();
}
QToolBar* TopWin::addToolBar(const QString& title)
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 1e86e1e0..73d796fa 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -4450,6 +4450,10 @@ void staff_t::update_part_indices()
* changing "share" status, the changed state isn't stored
*
* CURRENT TODO
+ * o fullscreen mode for muse
+ * o clear menu/toolbars when hiding a window
+ * o strange sizes of toolbars oO?
+ * o restore arranger's maximized state when loading
* o remove that ugly "bool initalizing" stuff. it's probably unneeded (watch out for the FINDMICH message)
* o mirror most menus to an additional right-click context menu to avoid the long mouse pointer
* journey to the menu bar. try to find a way which does not involve duplicate code!