diff options
author | Florian Jung <flo@windfisch.org> | 2011-10-12 16:21:09 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-10-12 16:21:09 +0000 |
commit | 55b46c943ef1fd5a1bd1a48c43448b0c0663ac71 (patch) | |
tree | 73e6023a8eb8f02676c5df04ffba17621f173c3b | |
parent | b1462cc01b80bfb18c1b157dfdf7ce9a0f198279 (diff) |
fixed "initial window size gets smaller and smaller" bug when in MDI mode
-rw-r--r-- | muse2/muse/cobject.cpp | 20 |
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) |