From bb977263ca285e93501ce703ac9bb70433f696df Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 13 May 2017 00:55:43 +0200 Subject: [PATCH] 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. --- app/actions/layers-commands.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index d1f40a8b64..10c6accdcc 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -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