diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-20 11:33:17 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-20 11:33:17 +0000 |
commit | ce2813cb1f4988669422c6af3e8c4442776e45c8 (patch) | |
tree | 098177c279f5376bd27d4db30f913f6e61471537 /src/gui/scrollarea.cpp | |
parent | 5acb9213cc2ee949a252a5c08a9a9a13542b94d5 (diff) | |
download | mana-ce2813cb1f4988669422c6af3e8c4442776e45c8.tar.gz mana-ce2813cb1f4988669422c6af3e8c4442776e45c8.tar.bz2 mana-ce2813cb1f4988669422c6af3e8c4442776e45c8.tar.xz mana-ce2813cb1f4988669422c6af3e8c4442776e45c8.zip |
Added garbage collection to the ScrollArea class. Fixed slider not being updated in the item amount box when the buttons are used.
Diffstat (limited to 'src/gui/scrollarea.cpp')
-rw-r--r-- | src/gui/scrollarea.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index 246e2ffa..d1873cb5 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -35,20 +35,27 @@ ImageRect ScrollArea::background; ImageRect ScrollArea::vMarker; Image *ScrollArea::buttons[4][2]; -ScrollArea::ScrollArea(): - gcn::ScrollArea() +ScrollArea::ScrollArea(bool gc): + gcn::ScrollArea(), + mGC(gc) { init(); } -ScrollArea::ScrollArea(gcn::Widget *widget): - gcn::ScrollArea(widget) +ScrollArea::ScrollArea(gcn::Widget *widget, bool gc): + gcn::ScrollArea(widget), + mGC(gc) { init(); } ScrollArea::~ScrollArea() { + // Garbage collection + if (mGC) { + delete mContent; + } + instances--; if (instances == 0) |