From 8b61d93fc869ea39a78cdc134002ef11bf3e69d3 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 16 Mar 2015 17:20:03 -0400 Subject: Opening a file in the map editor closes the current window if the current window is a blank slate --- tools/mapedit/src/world.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/mapedit/src/world.cpp') diff --git a/tools/mapedit/src/world.cpp b/tools/mapedit/src/world.cpp index f7b541d..c30f76c 100644 --- a/tools/mapedit/src/world.cpp +++ b/tools/mapedit/src/world.cpp @@ -9,6 +9,7 @@ World::World() newMap(); rootChildren.push_back(0); + empty = true; } World::World(std::string filename) @@ -170,6 +171,7 @@ std::shared_ptr World::getMap(int id) const void World::setDirty(bool dirty) { + if (dirty) empty = false; this->dirty = dirty; parent->MapDirtyDidChange(dirty); } @@ -372,3 +374,8 @@ void World::setLastMap(Map* map) { lastmap = map->getID(); } + +bool World::getEmpty() const +{ + return empty; +} -- cgit 1.4.1