summary refs log tree commit diff stats
path: root/tools/mapedit/src/world.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 17:20:03 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 17:20:03 -0400
commit8b61d93fc869ea39a78cdc134002ef11bf3e69d3 (patch)
treec2aca3668c058cbdc7dfd9537802750f9c4f6600 /tools/mapedit/src/world.cpp
parent82fb304e61191f27403b5dbfaa90f24d625dee87 (diff)
downloadtherapy-8b61d93fc869ea39a78cdc134002ef11bf3e69d3.tar.gz
therapy-8b61d93fc869ea39a78cdc134002ef11bf3e69d3.tar.bz2
therapy-8b61d93fc869ea39a78cdc134002ef11bf3e69d3.zip
Opening a file in the map editor closes the current window if the current window is a blank slate
Diffstat (limited to 'tools/mapedit/src/world.cpp')
-rw-r--r--tools/mapedit/src/world.cpp7
1 files changed, 7 insertions, 0 deletions
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()
9 newMap(); 9 newMap();
10 10
11 rootChildren.push_back(0); 11 rootChildren.push_back(0);
12 empty = true;
12} 13}
13 14
14World::World(std::string filename) 15World::World(std::string filename)
@@ -170,6 +171,7 @@ std::shared_ptr<Map> World::getMap(int id) const
170 171
171void World::setDirty(bool dirty) 172void World::setDirty(bool dirty)
172{ 173{
174 if (dirty) empty = false;
173 this->dirty = dirty; 175 this->dirty = dirty;
174 parent->MapDirtyDidChange(dirty); 176 parent->MapDirtyDidChange(dirty);
175} 177}
@@ -372,3 +374,8 @@ void World::setLastMap(Map* map)
372{ 374{
373 lastmap = map->getID(); 375 lastmap = map->getID();
374} 376}
377
378bool World::getEmpty() const
379{
380 return empty;
381}