diff --git a/src/map.cpp b/src/map.cpp index e1ffc2550..0ce43a573 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -238,7 +238,9 @@ unsigned Map::height() const void Map::set_width(unsigned width) { - if (width >= MIN_MAPSIZE && width <= MAX_MAPSIZE) + if (width != width_ && + width >= MIN_MAPSIZE && + width <= MAX_MAPSIZE) { width_=width; fixAspectRatio(); @@ -247,7 +249,9 @@ void Map::set_width(unsigned width) void Map::set_height(unsigned height) { - if (height >= MIN_MAPSIZE && height <= MAX_MAPSIZE) + if (height != height_ && + height >= MIN_MAPSIZE && + height <= MAX_MAPSIZE) { height_=height; fixAspectRatio(); @@ -256,8 +260,12 @@ void Map::set_height(unsigned height) void Map::resize(unsigned width,unsigned height) { - if (width >= MIN_MAPSIZE && width <= MAX_MAPSIZE && - height >= MIN_MAPSIZE && height <= MAX_MAPSIZE) + if (width != width_ && + height != height_ && + width >= MIN_MAPSIZE && + width <= MAX_MAPSIZE && + height >= MIN_MAPSIZE && + height <= MAX_MAPSIZE) { width_=width; height_=height;