mirror of https://github.com/odrling/Aegisub
Update the visual tool buttons when the active tool is changed via hotkey
Originally committed to SVN as r6424.
This commit is contained in:
parent
4ea45627b5
commit
9dbfe5d8e5
|
@ -75,7 +75,7 @@ namespace {
|
||||||
if (commands[i]->Type() & cmd::COMMAND_VALIDATE) {
|
if (commands[i]->Type() & cmd::COMMAND_VALIDATE) {
|
||||||
EnableTool(TOOL_ID_BASE + i, commands[i]->Validate(context));
|
EnableTool(TOOL_ID_BASE + i, commands[i]->Validate(context));
|
||||||
}
|
}
|
||||||
if (commands[i]->Type() & cmd::COMMAND_TOGGLE) {
|
if (commands[i]->Type() & cmd::COMMAND_TOGGLE || commands[i]->Type() & cmd::COMMAND_RADIO) {
|
||||||
ToggleTool(TOOL_ID_BASE + i, commands[i]->IsActive(context));
|
ToggleTool(TOOL_ID_BASE + i, commands[i]->IsActive(context));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@ void VideoDisplay::SetTool(VisualToolBase *new_tool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VideoDisplay::ToolIsType(std::type_info const& type) const {
|
bool VideoDisplay::ToolIsType(std::type_info const& type) const {
|
||||||
return typeid(*tool) == type;
|
return tool && typeid(*tool) == type;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2D VideoDisplay::GetMousePosition() const {
|
Vector2D VideoDisplay::GetMousePosition() const {
|
||||||
|
|
Loading…
Reference in New Issue