summary refs log tree commit diff stats
path: root/tools/mapedit
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 16:59:59 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 16:59:59 -0400
commitd7d8653224ec7997bc4f281052fbfb05dc5b4577 (patch)
tree606ad88017409c27b1f47684d186957260830456 /tools/mapedit
parent0d30e9b57229905f78e7bd60fe5d3cde72851f28 (diff)
downloadtherapy-d7d8653224ec7997bc4f281052fbfb05dc5b4577.tar.gz
therapy-d7d8653224ec7997bc4f281052fbfb05dc5b4577.tar.bz2
therapy-d7d8653224ec7997bc4f281052fbfb05dc5b4577.zip
Map editor now remembers last map you looked at
Diffstat (limited to 'tools/mapedit')
-rw-r--r--tools/mapedit/src/frame.cpp1
-rw-r--r--tools/mapedit/src/world.cpp5
-rw-r--r--tools/mapedit/src/world.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/tools/mapedit/src/frame.cpp b/tools/mapedit/src/frame.cpp index 9d489b8..500f2c4 100644 --- a/tools/mapedit/src/frame.cpp +++ b/tools/mapedit/src/frame.cpp
@@ -513,6 +513,7 @@ void MapeditFrame::SelectMap(Map* map)
513 currentMap = map; 513 currentMap = map;
514 mapEditor->SetMap(map); 514 mapEditor->SetMap(map);
515 titleBox->ChangeValue(map->getTitle()); 515 titleBox->ChangeValue(map->getTitle());
516 world->setLastMap(map);
516} 517}
517 518
518wxTreeItemId MapeditFrame::MoveTreeNode(wxTreeItemId toCopy, wxTreeItemId newParent) 519wxTreeItemId MapeditFrame::MoveTreeNode(wxTreeItemId toCopy, wxTreeItemId newParent)
diff --git a/tools/mapedit/src/world.cpp b/tools/mapedit/src/world.cpp index 4c42593..f7b541d 100644 --- a/tools/mapedit/src/world.cpp +++ b/tools/mapedit/src/world.cpp
@@ -367,3 +367,8 @@ const std::map<int, std::shared_ptr<Map>> World::getMaps() const
367{ 367{
368 return maps; 368 return maps;
369} 369}
370
371void World::setLastMap(Map* map)
372{
373 lastmap = map->getID();
374}
diff --git a/tools/mapedit/src/world.h b/tools/mapedit/src/world.h index 7d796cc..c30f4b4 100644 --- a/tools/mapedit/src/world.h +++ b/tools/mapedit/src/world.h
@@ -29,6 +29,7 @@ class World {
29 void setParent(MapeditFrame* parent); 29 void setParent(MapeditFrame* parent);
30 void save(std::string filename, wxTreeCtrl* mapTree); 30 void save(std::string filename, wxTreeCtrl* mapTree);
31 Map* getLastMap() const; 31 Map* getLastMap() const;
32 void setLastMap(Map* map);
32 std::list<std::shared_ptr<Map>> getRootMaps() const; 33 std::list<std::shared_ptr<Map>> getRootMaps() const;
33 const std::map<int, std::shared_ptr<Map>> getMaps() const; 34 const std::map<int, std::shared_ptr<Map>> getMaps() const;
34 35