mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 22:36:34 +00:00
Fixed Back To Turn menu items overriding regular ones
This commit is contained in:
parent
c77800333c
commit
e50d9ed417
@ -380,7 +380,6 @@ void play_controller::hotkey_handler::expand_autosaves(std::vector<config>& item
|
|||||||
{
|
{
|
||||||
const compression::format comp_format = preferences::save_compression_format();
|
const compression::format comp_format = preferences::save_compression_format();
|
||||||
|
|
||||||
savenames_.clear();
|
|
||||||
savenames_.resize(i);
|
savenames_.resize(i);
|
||||||
|
|
||||||
auto pos = items.erase(items.begin() + i);
|
auto pos = items.erase(items.begin() + i);
|
||||||
@ -445,7 +444,9 @@ void play_controller::hotkey_handler::show_menu(const std::vector<config>& items
|
|||||||
|
|
||||||
// Add special non-hotkey items to the menu and remember their indices
|
// Add special non-hotkey items to the menu and remember their indices
|
||||||
// Iterate in reverse to avoid also iterating over the new inserted items
|
// Iterate in reverse to avoid also iterating over the new inserted items
|
||||||
|
savenames_.clear();
|
||||||
wml_commands_.clear();
|
wml_commands_.clear();
|
||||||
|
|
||||||
for(int i = items.size() - 1; i >= 0; i--) {
|
for(int i = items.size() - 1; i >= 0; i--) {
|
||||||
if(items[i]["id"] == "AUTOSAVES") {
|
if(items[i]["id"] == "AUTOSAVES") {
|
||||||
expand_autosaves(items, i);
|
expand_autosaves(items, i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user