[gimp/wip/Jehan/issue-498-quick-brush-edit] app: fix switching seamlessly from constrained to unconstrained canvas…
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/issue-498-quick-brush-edit] app: fix switching seamlessly from constrained to unconstrained canvas…
- Date: Thu, 11 Aug 2022 23:04:33 +0000 (UTC)
commit 4fe06dccd14704138b9e857c9fa8977f64b116e7
Author: Jehan <jehan girinstud io>
Date: Fri Aug 12 01:03:56 2022 +0200
app: fix switching seamlessly from constrained to unconstrained canvas…
… rotation and back.
app/display/gimpdisplayshell-tool-events.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 095f725ce8..b03a2b0125 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -1126,7 +1126,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
shell->picked_layer = NULL;
shell->mod_action = GIMP_MODIFIER_ACTION_NONE;
}
- else if (shell->mod_action != GIMP_MODIFIER_ACTION_NONE)
+ else if (shell->mod_action != GIMP_MODIFIER_ACTION_NONE &&
+ (state & gimp_get_all_modifiers_mask ()) == 0)
{
gimp_display_shell_stop_scrolling (shell, event);
}
@@ -1822,6 +1823,19 @@ gimp_display_shell_handle_scrolling (GimpDisplayShell *shell,
else if (state == gimp_get_toggle_behavior_mask ())
mod_action = GIMP_MODIFIER_ACTION_ZOOMING;
}
+ else if (mod_action == GIMP_MODIFIER_ACTION_ROTATING ||
+ mod_action == GIMP_MODIFIER_ACTION_STEP_ROTATING)
+ {
+ state &= gimp_get_all_modifiers_mask ();
+
+ /* Allow switching from the constrained to non-constrained
+ * variant, back and forth, during a single scroll.
+ */
+ if (state == gimp_get_extend_selection_mask ())
+ mod_action = GIMP_MODIFIER_ACTION_ROTATING;
+ else if (state == (gimp_get_extend_selection_mask () | GDK_CONTROL_MASK))
+ mod_action = GIMP_MODIFIER_ACTION_STEP_ROTATING;
+ }
switch (mod_action)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]