Follow-up Comment #1, bug #17136 (project wesnoth):

The below diff fixes that, but opens up a different issue: undoing when the
whiteboard is *not* active. The second part of the expression was an attempt
to fix that, but it didn't help.


diff --git a/src/menu_events.cpp b/src/menu_events.cpp
index 2f06bec..9bd45d3 100644
--- a/src/menu_events.cpp
+++ b/src/menu_events.cpp
@@ -1041,6 +1041,11 @@ void menu_handler::undo(int side_num)
        team &current_team = teams_[side_num - 1];
 
        undo_action& action = resources::undo_stack->back();
+
+       // FIXME: this is probably a hack
+       if(resources::whiteboard->is_active() ||
resources::whiteboard->unit_has_actions(action.affected_unit))
+               return;
+
        if (action.is_dismiss()) {
                //undo a dismissal




This is AI, for some reason I can't log in right now.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17136>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to