[gimp] Bug 783108 - Make paint tools draw in all open views
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 783108 - Make paint tools draw in all open views
- Date: Fri, 26 May 2017 10:51:12 +0000 (UTC)
commit 2aa246f5e9e27d0fcb624dd66cf9ecc5a4e01f7a
Author: Richard McLean <programmer_ceds yahoo co uk>
Date: Fri May 26 00:06:58 2017 +0100
Bug 783108 - Make paint tools draw in all open views
Committed with minor fixes by the reviewer (Jehan).
app/tools/gimppainttool.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index ab35f1b..31ad79d 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -24,6 +24,7 @@
#include "libgimpmath/gimpmath.h"
#include "tools-types.h"
+#include "core/gimp.h"
#include "config/gimpdisplayconfig.h"
@@ -257,6 +258,7 @@ gimp_paint_tool_button_press (GimpTool *tool,
GimpCoords curr_coords;
gint off_x, off_y;
GError *error = NULL;
+ GList *list;
if (gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))
{
@@ -364,7 +366,14 @@ gimp_paint_tool_button_press (GimpTool *tool,
}
gimp_projection_flush_now (gimp_image_get_projection (image));
- gimp_display_flush_now (display);
+
+ /* Update all views this image is in. */
+ for (list = gimp_get_display_iter (image->gimp);
+ list;
+ list = g_list_next (list))
+ {
+ gimp_display_flush_now (GIMP_DISPLAY (list->data));
+ }
gimp_draw_tool_start (draw_tool, display);
}
@@ -429,6 +438,7 @@ gimp_paint_tool_motion (GimpTool *tool,
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
GimpCoords curr_coords;
gint off_x, off_y;
+ GList *list;
GIMP_TOOL_CLASS (parent_class)->motion (tool, coords, time, state, display);
@@ -457,7 +467,14 @@ gimp_paint_tool_motion (GimpTool *tool,
&curr_coords, time);
gimp_projection_flush_now (gimp_image_get_projection (image));
- gimp_display_flush_now (display);
+
+ /* Update all views this image is in. */
+ for (list = gimp_get_display_iter (image->gimp);
+ list;
+ list = g_list_next (list))
+ {
+ gimp_display_flush_now (GIMP_DISPLAY (list->data));
+ }
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]