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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user