summary refs log tree commit diff stats
path: root/tools/mapedit/src/world.cpp
diff options
context:
space:
mode:
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}