[gimp/wip/Jehan/issue-498-quick-brush-edit: 110/117] app: stop alt-right click brush size change when releasing Alt first.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/issue-498-quick-brush-edit: 110/117] app: stop alt-right click brush size change when releasing Alt first.
- Date: Sat, 2 Apr 2022 21:58:01 +0000 (UTC)
commit 6c7491234996b71dd917c66e9603c747c0bfb49a
Author: Jehan <jehan girinstud io>
Date: Tue Feb 15 12:18:42 2022 +0100
app: stop alt-right click brush size change when releasing Alt first.
Until now, it was only stopiing when releasing right click, but it's
actually more accurate when releasing the Alt key first as the button is
on the mouse/stylus (so releasing it can provoke small hand moves,
especially visible with stylus, I think). Now it stops whatever is
released first.
app/display/gimpdisplayshell-tool-events.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 40faff51ae..50a64961c6 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -536,7 +536,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
}
else if (mod_state == GDK_MOD1_MASK)
{
- shell->mod1_settings = TRUE;
gimp_display_shell_start_scrolling (shell, event, state,
bevent->x, bevent->y);
}
@@ -1104,15 +1103,21 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
active_tool = tool_manager_get_active (gimp);
- if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK &&
- shell->picked_layer)
+ if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK)
{
- GimpStatusbar *statusbar;
+ if (shell->picked_layer)
+ {
+ GimpStatusbar *statusbar;
- statusbar = gimp_display_shell_get_statusbar (shell);
- gimp_statusbar_pop_temp (statusbar);
+ statusbar = gimp_display_shell_get_statusbar (shell);
+ gimp_statusbar_pop_temp (statusbar);
- shell->picked_layer = NULL;
+ shell->picked_layer = NULL;
+ }
+ else if (shell->mod1_settings)
+ {
+ gimp_display_shell_stop_scrolling (shell, event);
+ }
}
if ((state & GDK_BUTTON1_MASK) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]