[gimp] app: pause/resume active tool when rotating canvas
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: pause/resume active tool when rotating canvas
- Date: Thu, 14 May 2020 21:51:57 +0000 (UTC)
commit cd5e4e99dd2f3ec4dae5425cd2bfe647f161061e
Author: Ell <ell_se yahoo com>
Date: Thu May 14 23:01:12 2020 +0300
app: pause/resume active tool when rotating canvas
In GimpDisplayShell, pause and restore the active tool when
rotating the canvas, similarly to scrolling and scaling.
app/display/gimpdisplayshell-rotate.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/app/display/gimpdisplayshell-rotate.c b/app/display/gimpdisplayshell-rotate.c
index 2049ba2dc9..33f085e04b 100644
--- a/app/display/gimpdisplayshell-rotate.c
+++ b/app/display/gimpdisplayshell-rotate.c
@@ -69,6 +69,9 @@ gimp_display_shell_flip (GimpDisplayShell *shell,
/* Maintain the current center of the viewport. */
gimp_display_shell_save_viewport_center (shell, &cx, &cy);
+ /* freeze the active tool */
+ gimp_display_shell_pause (shell);
+
/* Adjust the rotation angle so that the image gets reflected across the
* horizontal, and/or vertical, axes in screen space, regardless of the
* current rotation.
@@ -89,6 +92,9 @@ gimp_display_shell_flip (GimpDisplayShell *shell,
gimp_display_shell_expose_full (shell);
gimp_display_shell_render_invalidate_full (shell);
+
+ /* re-enable the active tool */
+ gimp_display_shell_resume (shell);
}
}
@@ -119,6 +125,9 @@ gimp_display_shell_rotate_to (GimpDisplayShell *shell,
shell->rotate_angle = value;
+ /* freeze the active tool */
+ gimp_display_shell_pause (shell);
+
gimp_display_shell_scroll_clamp_and_update (shell);
gimp_display_shell_rotated (shell);
@@ -127,6 +136,9 @@ gimp_display_shell_rotate_to (GimpDisplayShell *shell,
gimp_display_shell_expose_full (shell);
gimp_display_shell_render_invalidate_full (shell);
+
+ /* re-enable the active tool */
+ gimp_display_shell_resume (shell);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]