From 407a4233221c2280ef2a92914c8d23e463aa665c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 15 May 2015 22:38:57 +0300 Subject: Fix draw map layers before switching map modes. --- src/resources/map/map.cpp | 5 ++++- src/resources/mapreader.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/resources') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 9f4feb87b..aa7248c8d 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1551,8 +1551,11 @@ void Map::updateDrawLayersList() void Map::setMask(const int mask) { if (mask != mMask) + { mRedrawMap = true; - mMask = mask; + mMask = mask; + updateDrawLayersList(); + } } void Map::setMusicFile(const std::string &file) diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 7b21cd1d0..825be9a25 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -461,8 +461,8 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) map->reduce(); map->setWalkLayer(resman->getWalkLayer(fileName, map)); unloadTempLayers(); - BLOCK_END("MapReader::readMap xml") map->updateDrawLayersList(); + BLOCK_END("MapReader::readMap xml") return map; } -- cgit v1.2.3-70-g09d2