diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-10 20:29:14 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-10 21:24:20 +0200 |
commit | 3c912139aef92a3e070ade966c91c297b7a5310c (patch) | |
tree | 2628e66b9cfe3cd494bb33641ac995db949c01fb /src/gui/widgets/window.cpp | |
parent | 6e3a3c345a2cad8308738b8b7b5292b9002c1a6e (diff) | |
download | mana-3c912139aef92a3e070ade966c91c297b7a5310c.tar.gz mana-3c912139aef92a3e070ade966c91c297b7a5310c.tar.bz2 mana-3c912139aef92a3e070ade966c91c297b7a5310c.tar.xz mana-3c912139aef92a3e070ade966c91c297b7a5310c.zip |
Fixed the resize grip of the party window
It wasn't re-added after doing a clear. Also, don't leak all the
PartyMember and Avatar instances.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 87051686..19d80671 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -683,21 +683,25 @@ int Window::getGuiAlpha() Layout &Window::getLayout() { - if (!mLayout) mLayout = new Layout; + if (!mLayout) + mLayout = new Layout; return *mLayout; } void Window::clearLayout() { - clear(); // This removes widgets from the container + clear(); - while (!mWidgets.empty()) - delete mWidgets.front(); + // Restore the resize grip + if (mGrip) + add(mGrip); - if (!mLayout) + // Recreate layout instance when one is present + if (mLayout) + { delete mLayout; - mLayout = new Layout; - + mLayout = new Layout; + } } LayoutCell &Window::place(int x, int y, gcn::Widget *wg, int w, int h) |