Fix WML commands replacing regular menuitems
This commit is contained in:
parent
19fa4244af
commit
c77800333c
1 changed files with 1 additions and 1 deletions
|
@ -413,7 +413,6 @@ void play_controller::hotkey_handler::expand_autosaves(std::vector<config>& item
|
|||
|
||||
void play_controller::hotkey_handler::expand_wml_commands(std::vector<config>& items, int i)
|
||||
{
|
||||
wml_commands_.clear();
|
||||
// Pad the commands with null pointers (keeps the indices of items and wml_commands_ synced).
|
||||
wml_commands_.resize(i);
|
||||
|
||||
|
@ -446,6 +445,7 @@ 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
|
||||
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