diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-10-21 19:05:56 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-10-21 19:05:56 +0000 |
commit | 0b478a22bfd5134dd6f43b5e4ade3ebacd8777f1 (patch) | |
tree | 71d99180551c0f3f6246757ee41f23367eb37ef9 /src/gui/window.cpp | |
parent | 18c675031f718523586e72f5e1450bb33d457841 (diff) | |
download | mana-0b478a22bfd5134dd6f43b5e4ade3ebacd8777f1.tar.gz mana-0b478a22bfd5134dd6f43b5e4ade3ebacd8777f1.tar.bz2 mana-0b478a22bfd5134dd6f43b5e4ade3ebacd8777f1.tar.xz mana-0b478a22bfd5134dd6f43b5e4ade3ebacd8777f1.zip |
Changed to use default values when restoring missing settings.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index f8d4a503..1509ac92 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -525,13 +525,17 @@ void Window::loadWindowState(std::string const &name) { mConfigName = name; - setPosition((int) config.getValue(name + "WinX", getX()), - (int) config.getValue(name + "WinY", getY())); + setPosition((int) config.getValue(name + "WinX", mDefaultX), + (int) config.getValue(name + "WinY", mDefaultY)); if (mGrip) { - setSize((int) config.getValue(name + "WinWidth", getWidth()), - (int) config.getValue(name + "WinHeight", getHeight())); + setSize((int) config.getValue(name + "WinWidth", mDefaultWidth), + (int) config.getValue(name + "WinHeight", mDefaultHeight)); + } + else + { + setSize(mDefaultWidth, mDefaultHeight); } } @@ -542,9 +546,6 @@ void Window::setDefaultSize(int defaultX, int defaultY, mDefaultY = defaultY; mDefaultWidth = defaultWidth; mDefaultHeight = defaultHeight; - - setPosition(mDefaultX, mDefaultY); - setContentSize(mDefaultWidth, mDefaultHeight); } void Window::resetToDefaultSize() |