hide unavailable menu items in the editor (broken recently)

This commit is contained in:
Tomasz Śniatowski 2008-11-22 14:56:06 +01:00
parent 87b78deb07
commit 8a3b1cf538

View file

@ -985,6 +985,10 @@ void editor_controller::show_menu(const std::vector<std::string>& items_arg, int
} else {
hotkey::get_hotkey(*i).set_description(_("Can't Redo"));
}
} else if(!can_execute_command(command)
|| (context_menu && !in_context_menu(command))) {
i = items.erase(i);
continue;
}
++i;
}