app: layers-text-tool should give the focus to the canvas.

If focus is on the layer list for instance, running this action from
right-click menu raises the on-canvas toolbar, ready for edition, with a
visible text cursor. But if the canvas has no focus (since you clicked
on the layer list, it has the focus), you still have to move your mouse
over and click the text on canvas. That doesn't make sense and there
would be barely any reason to use this over selecting the text tool then
clicking the canvas.
This commit is contained in:
Jehan 2017-05-13 00:55:43 +02:00
parent 526918b26c
commit bb977263ca
1 changed files with 8 additions and 1 deletions

View File

@ -203,7 +203,14 @@ layers_text_tool_cmd_callback (GtkAction *action,
}
if (GIMP_IS_TEXT_TOOL (active_tool))
gimp_text_tool_set_layer (GIMP_TEXT_TOOL (active_tool), layer);
{
GimpDisplayShell *shell;
gimp_text_tool_set_layer (GIMP_TEXT_TOOL (active_tool), layer);
shell = gimp_display_get_shell (active_tool->display);
gtk_widget_grab_focus (shell->canvas);
}
}
void