summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r--src/gui/minimap.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 6bca796d..75ee7e3d 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -92,21 +92,14 @@ void Minimap::setMapImage(Image *img)
void Minimap::toggle()
{
- mShow = !mShow;
+ mShow = ! isVisible();
+ setVisible(mShow);
}
void Minimap::draw(gcn::Graphics *graphics)
{
- setVisible(mShow);
-
- if (!isVisible())
- return;
-
Window::draw(graphics);
- if (!mShow)
- return;
-
const gcn::Rectangle a = getChildrenArea();
graphics->pushClipArea(a);