summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-12 16:21:09 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-12 16:21:09 +0000
commit55b46c943ef1fd5a1bd1a48c43448b0c0663ac71 (patch)
tree73e6023a8eb8f02676c5df04ffba17621f173c3b
parentb1462cc01b80bfb18c1b157dfdf7ce9a0f198279 (diff)
fixed "initial window size gets smaller and smaller" bug when in MDI mode
-rw-r--r--muse2/muse/cobject.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index 59a9463e..b4c6537c 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -85,8 +85,11 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
subwinAction->setChecked(isMdiWin());
shareAction->setChecked(_sharesToolsAndMenu);
fullscreenAction->setEnabled(!isMdiWin());
-
- resize(_widthInit[_type], _heightInit[_type]);
+
+ if (mdisubwin)
+ mdisubwin->resize(_widthInit[_type], _heightInit[_type]);
+ else
+ resize(_widthInit[_type], _heightInit[_type]);
}
@@ -359,8 +362,17 @@ void TopWin::shareToolsAndMenu(bool val)
void TopWin::storeInitialState() const
{
- _widthInit[_type] = width();
- _heightInit[_type] = height();
+ if (mdisubwin)
+ {
+ _widthInit[_type] = mdisubwin->width();
+ _heightInit[_type] = mdisubwin->height();
+ }
+ else
+ {
+ _widthInit[_type] = width();
+ _heightInit[_type] = height();
+ }
+
if (sharesToolsAndMenu())
{
if (muse->getCurrentMenuSharingTopwin() == this)