Author: alink
Date: Mon Jun 16 22:35:17 2008
New Revision: 27231

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27231&view=rev
Log:
Fix bug #11630: Unit can move in others' round after 'undo'
Now forbid undo and redo when observing. Also do the same for "rename unit"
(it was possible to do with hotkey but probably a source of OOS)

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=27231&r1=27230&r2=27231&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Mon Jun 16 22:35:17 2008
@@ -565,15 +565,15 @@
                return network::nconnections() > 0;
 
        case hotkey::HOTKEY_REDO:
-               return !linger_ && !redo_stack_.empty() && 
!events::commands_disabled;
+               return !linger_ && !redo_stack_.empty() && 
!events::commands_disabled && !browse_;
        case hotkey::HOTKEY_UNDO:
-               return !linger_ && !undo_stack_.empty() && 
!events::commands_disabled;
+               return !linger_ && !undo_stack_.empty() && 
!events::commands_disabled && !browse_;
 
        case hotkey::HOTKEY_UNIT_DESCRIPTION:
                return menu_handler_.current_unit(mouse_handler_) != 
units_.end();
 
        case hotkey::HOTKEY_RENAME_UNIT:
-               return !events::commands_disabled &&
+               return !events::commands_disabled && !browse_ &&
                        menu_handler_.current_unit(mouse_handler_) != 
units_.end() &&
                        
!(menu_handler_.current_unit(mouse_handler_)->second.unrenamable()) &&
                        
menu_handler_.current_unit(mouse_handler_)->second.side() == 
gui_->viewing_team()+1 &&


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

Reply via email to