Initial framework for scenario editor undo/redo

In addition to the framework, this enables undo/redo of one action - adding a new town
This commit is contained in:
2017-02-12 18:27:01 -05:00
parent e38053d39f
commit 683ab805ec
14 changed files with 130 additions and 32 deletions

View File

@@ -20,6 +20,7 @@
#include "map_parse.hpp"
#include "winutil.hpp"
#include "choicedlog.hpp"
#include "undo.hpp"
extern cScenario scenario;
@@ -995,6 +996,9 @@ void save_scenario(bool rename) {
if(toFile.empty()) return;
}
extern cUndoList undo_list;
undo_list.save();
if(scenario.is_legacy && cChoiceDlog("save-legacy-scen", {"update", "cancel"}).show() == "update")
scenario.is_legacy = false;