diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-20 17:12:58 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-20 17:12:58 -0600 |
commit | 9f43e32022ac261c6475fc68832cbe9ba9645362 (patch) | |
tree | e7adfbfd17ade39fe03671e2be677934a7e894cd /src/gui/widgets/window.cpp | |
parent | 3a7224117dfb6709b059fc258876699e969ec119 (diff) | |
download | mana-9f43e32022ac261c6475fc68832cbe9ba9645362.tar.gz mana-9f43e32022ac261c6475fc68832cbe9ba9645362.tar.bz2 mana-9f43e32022ac261c6475fc68832cbe9ba9645362.tar.xz mana-9f43e32022ac261c6475fc68832cbe9ba9645362.zip |
Fix up window visibility saving/restoring
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index fbd328d0..7de09994 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -50,6 +50,8 @@ Window::Window(const std::string &caption, bool modal, Window *parent, mShowTitle(true), mModal(modal), mCloseButton(false), + mDefaultVisible(false), + mSaveVisible(false), mStickyButton(false), mSticky(false), mMinWinWidth(100), @@ -492,8 +494,8 @@ void Window::loadWindowState() setPosition((int) config.getValue(name + "WinX", mDefaultX), (int) config.getValue(name + "WinY", mDefaultY)); - if (mCloseButton) - setVisible((bool) config.getValue(name + "Visible", false)); + if (mSaveVisible) + setVisible((bool) config.getValue(name + "Visible", mDefaultVisible)); if (mStickyButton) setSticky((bool) config.getValue(name + "Sticky", isSticky())); @@ -534,7 +536,7 @@ void Window::saveWindowState() config.setValue(mWindowName + "WinX", getX()); config.setValue(mWindowName + "WinY", getY()); - if (mCloseButton) + if (mSaveVisible) config.setValue(mWindowName + "Visible", isVisible()); if (mStickyButton) |