From 3680f5ae4b9b24158aafeffe7b81fefdb8e3939b Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Sun, 19 Feb 2017 02:36:54 +0100 Subject: [PATCH] wrap new redo code in a hidden preference option fo testing. --- src/actions/undo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/undo.cpp b/src/actions/undo.cpp index d2a721f8e356..a0a78bc65281 100644 --- a/src/actions/undo.cpp +++ b/src/actions/undo.cpp @@ -25,6 +25,7 @@ #include "map/map.hpp" // for gamemap #include "map/location.hpp" // for map_location, operator<<, etc #include "mouse_handler_base.hpp" // for command_disabler +#include "preferences.hpp" #include "recall_list_manager.hpp" // for recall_list_manager #include "replay.hpp" // for recorder, replay #include "replay_helper.hpp" // for replay_helper @@ -414,7 +415,7 @@ void undo_list::redo() // only if the redo is successful.) redos_list::auto_type action = redos_.pop_back(); - if (!action->umc_commands_undo.empty()) { + if (preferences::get("no_on_redo", false)) { const config& command_wml = action->replay_data.child("command"); std::string commandname = command_wml.all_children_range().front().key; const config& data = command_wml.all_children_range().front().cfg;