From 3841d3d5378173aabdd0d79a25b8cb08ca3591fb Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 12 Apr 2018 10:03:13 +0200 Subject: [PATCH] Bug 795185 - "Show image preview" works differently if checked before... ... or during rotation. If checked before rotation, it works as expected, i.e. one sees only the original or the rotated image. While rotation is in progress: if unchecked, one sees neither the original nor the image preview; if checked, one sees both original and rotated preview. Let's make the behavior consistent and only show exactly one version at all time. --- app/tools/gimptransformtool.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c index 67a4f0bd8c..6673e7e62c 100644 --- a/app/tools/gimptransformtool.c +++ b/app/tools/gimptransformtool.c @@ -617,12 +617,26 @@ gimp_transform_tool_options_notify (GimpTool *tool, { if (tr_tool->preview) { - gboolean show_preview; + GimpDisplay *display; + GimpImage *image; + GimpItem *item; + gboolean show_preview; show_preview = gimp_transform_options_show_preview (tr_options) && tr_tool->transform_valid; gimp_canvas_item_set_visible (tr_tool->preview, show_preview); + + display = tool->display; + image = gimp_display_get_image (display); + item = gimp_transform_tool_check_active_item (tr_tool, image, TRUE, NULL); + if (item) + { + if (show_preview) + gimp_transform_tool_hide_active_item (tr_tool, item); + else + gimp_transform_tool_show_active_item (tr_tool); + } } } else if (g_str_has_prefix (pspec->name, "constrain-") ||