Skip to content

Commit

Permalink
wrap new redo code in a hidden preference option fo testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Feb 19, 2017
1 parent 7d3de6e commit 3680f5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/undo.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3680f5a

Please sign in to comment.