Fixed Back To Turn menu items overriding regular ones
This commit is contained in:
parent
c77800333c
commit
e50d9ed417
1 changed files with 2 additions and 1 deletions
|
@ -380,7 +380,6 @@ void play_controller::hotkey_handler::expand_autosaves(std::vector<config>& item
|
|||
{
|
||||
const compression::format comp_format = preferences::save_compression_format();
|
||||
|
||||
savenames_.clear();
|
||||
savenames_.resize(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
|
||||
// Iterate in reverse to avoid also iterating over the new inserted items
|
||||
savenames_.clear();
|
||||
wml_commands_.clear();
|
||||
|
||||
for(int i = items.size() - 1; i >= 0; i--) {
|
||||
if(items[i]["id"] == "AUTOSAVES") {
|
||||
expand_autosaves(items, i);
|
||||
|
|
Loading…
Add table
Reference in a new issue