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
2 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ namespace {
|
|||
if (commands[i]->Type() & cmd::COMMAND_VALIDATE) {
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ void VideoDisplay::SetTool(VisualToolBase *new_tool) {
|
|||
}
|
||||
|
||||
bool VideoDisplay::ToolIsType(std::type_info const& type) const {
|
||||
return typeid(*tool) == type;
|
||||
return tool && typeid(*tool) == type;
|
||||
}
|
||||
|
||||
Vector2D VideoDisplay::GetMousePosition() const {
|
||||
|
|
Loading…
Reference in a new issue