Author: sapient
Date: Fri Apr 20 05:17:15 2007
New Revision: 16943
URL: http://svn.gna.org/viewcvs/wesnoth?rev=16943&view=rev
Log:
fix bug #8951: [command] in [set_menu_item] doesn't invalidate undo
Modified:
trunk/src/play_controller.cpp
Modified: trunk/src/play_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=16943&r1=16942&r2=16943&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Fri Apr 20 05:17:15 2007
@@ -465,7 +465,12 @@
}
gamemap::location const& menu_hex =
mouse_handler_.get_last_hex();
recorder.add_event(wml_commands_[i]->name, menu_hex);
- game_events::fire(wml_commands_[i]->name, menu_hex);
+ if(game_events::fire(wml_commands_[i]->name, menu_hex))
{
+ //the event has mutated the gamestate
+ apply_shroud_changes(undo_stack_, gui_,
status_, map_, gameinfo_,
+ units_, teams_, (player_number_ - 1));
+ undo_stack_.clear();
+ }
return true;
}
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits