[gimp] Bug 795185 - "Show image preview" works differently if checked before...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 795185 - "Show image preview" works differently if checked before...
- Date: Thu, 12 Apr 2018 08:09:57 +0000 (UTC)
commit 3841d3d5378173aabdd0d79a25b8cb08ca3591fb
Author: Jehan <jehan girinstud io>
Date: Thu Apr 12 10:03:13 2018 +0200
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 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index 67a4f0b..6673e7e 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-") ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]