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.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index aa06da31..17a7e82a 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -56,13 +56,13 @@ Minimap::Minimap():
setResizable(false);
setDefaultVisible(true);
- setSaveVisible(false);
+ setSaveVisible(true);
setStickyButton(true);
setSticky(false);
loadWindowState();
- setVisible(mShow);
+ setVisible(mShow, isSticky());
}
Minimap::~Minimap()
@@ -94,9 +94,6 @@ void Minimap::setMap(Map *map)
ResourceManager *resman = ResourceManager::getInstance();
mMapImage = resman->getImage(map->getProperty("minimap"));
- if (!mShow)
- return;
-
if (mMapImage)
{
const int offsetX = 2 * getPadding();
@@ -120,17 +117,19 @@ void Minimap::setMap(Map *map)
setDefaultSize(getX(), getY(), getWidth(), getHeight());
resetToDefaultSize();
- setVisible(true);
+ if (mShow)
+ setVisible(true);
}
else
{
- setVisible(false);
+ if (!isSticky())
+ setVisible(false);
}
}
void Minimap::toggle()
{
- setVisible(!mShow, isSticky());
+ setVisible(!isVisible(), isSticky());
mShow = isVisible();
}