Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove code from replay_controller that's already handled by the hotk…
…ey system Fixes a crash when playing a replay that includes a theme, when that theme doesn't have all of the buttons that the removed code expected. For example, this replay from SXRPG 5.2.3 has two replay themes, of which one lacks button-nextmove: * https://replays.wesnoth.org/1.14/20190701/SXRPG_TempleOfBones_Turn_8_(53897).bz2 All of the button::enable() calls were unnecessary logic, because the hotkey system will query replay_controller::can_execute_command() and enable or disable the buttons to match. However, the enable() calls appear to have had the side-effect of triggering the hotkey system to check the buttons' required states and redraw. The code in build_replay_theme() was unreachable, because replay_controller doesn't attach itself to the completely_redrawn event.
- Loading branch information
1 parent
9b99856
commit ea25735
Showing
2 changed files
with
33 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters