summaryrefslogtreecommitdiff
path: root/src/gui/specialswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/specialswindow.cpp')
-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