summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Leese <leese.thomas81@gmail.com>2012-08-07 10:56:58 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-07 12:31:56 +0200
commit39c36efc9de6f31d64b6e0b5376989887b7e72e5 (patch)
treecf42c92a741ee8a4c1206e6108007bf030aec49b /src
parent1937b8e19e370a8fa9a47339e07415a315b7c935 (diff)
downloadmana-39c36efc9de6f31d64b6e0b5376989887b7e72e5.tar.gz
mana-39c36efc9de6f31d64b6e0b5376989887b7e72e5.tar.bz2
mana-39c36efc9de6f31d64b6e0b5376989887b7e72e5.tar.xz
mana-39c36efc9de6f31d64b6e0b5376989887b7e72e5.zip
Fixed issue where previous special entries were drawn underneath
Reviewed-by: Erik Schilling.
Diffstat (limited to 'src')
-rw-r--r--src/gui/specialswindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp
index 53106da2..d96b5805 100644
--- a/src/gui/specialswindow.cpp
+++ b/src/gui/specialswindow.cpp
@@ -160,6 +160,13 @@ void SpecialsWindow::draw(gcn::Graphics *graphics)
void SpecialsWindow::rebuild(const std::map<int, Special> &specialData)
{
+ // remove current entries so they don't get drawn underneath
+ for (std::map<int, SpecialEntry *>::const_iterator it = mEntries.begin();
+ it != mEntries.end(); ++it)
+ {
+ remove(it->second);
+ }
+
make_dtor(mEntries);
mEntries.clear();
int vPos = 0; //vertical position of next placed element