mirror of https://github.com/odrling/Aegisub
Handle commands which change types at runtime. Closes #1413.
Originally committed to SVN as r6406.
This commit is contained in:
parent
983ffc1e83
commit
64553dd633
|
@ -146,8 +146,10 @@ class CommandManager {
|
|||
void UpdateItem(std::pair<std::string, wxMenuItem*> const& item) {
|
||||
cmd::Command *c = cmd::get(item.first);
|
||||
int flags = c->Type();
|
||||
if (flags & cmd::COMMAND_VALIDATE)
|
||||
if (flags & cmd::COMMAND_VALIDATE) {
|
||||
item.second->Enable(c->Validate(context));
|
||||
flags = c->Type();
|
||||
}
|
||||
if (flags & cmd::COMMAND_DYNAMIC_NAME)
|
||||
UpdateItemName(item);
|
||||
if (flags & cmd::COMMAND_DYNAMIC_HELP)
|
||||
|
|
Loading…
Reference in New Issue