Backport the fix for bug #11630
(preventing redo and rename during opponent's turn)
This commit is contained in:
parent
f23c94c671
commit
3e2e2887c1
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Version 1.4.3+svn:
|
||||
* miscellaneous and bug fixes:
|
||||
* fix bug #11630 (preventing redo and rename during opponent's turn)
|
||||
|
||||
Version 1.4.3:
|
||||
* campaigns:
|
||||
* The Rise of Wesnoth:
|
||||
|
|
|
@ -556,15 +556,15 @@ bool play_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int in
|
|||
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 &&
|
||||
|
|
Loading…
Add table
Reference in a new issue