[gimp/gimp-2-10] app: don't detroy cached data when disabling filter-tool preview
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: don't detroy cached data when disabling filter-tool preview
- Date: Thu, 2 Apr 2020 16:05:34 +0000 (UTC)
commit 122d4b6f053f1bd1dcf7eac01c326c134ed55b9a
Author: Ell <ell_se yahoo com>
Date: Thu Apr 2 18:50:58 2020 +0300
app: don't detroy cached data when disabling filter-tool preview
In GimpFilterTool, use gimp_drawable_filter_set_preview(), added in
the previous commit, to toggle the filter's preview, instead of
removing and re-adding the filter. This avoids destroying cached
results when disabling the preview, allowing to quickly toggle the
preview on and off to compare the result.
(cherry picked from commit 912b36a8f813551f3da1f8151f3af14266954e9a)
app/tools/gimpfiltertool.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c
index 4857eadc05..0351425168 100644
--- a/app/tools/gimpfiltertool.c
+++ b/app/tools/gimpfiltertool.c
@@ -724,6 +724,8 @@ gimp_filter_tool_options_notify (GimpTool *tool,
if (! strcmp (pspec->name, "preview") &&
filter_tool->filter)
{
+ gimp_filter_tool_update_filter (filter_tool);
+
if (filter_options->preview)
{
gimp_drawable_filter_apply (filter_tool->filter, NULL);
@@ -733,8 +735,6 @@ gimp_filter_tool_options_notify (GimpTool *tool,
}
else
{
- gimp_drawable_filter_abort (filter_tool->filter);
-
if (filter_options->preview_split)
gimp_filter_tool_remove_guide (filter_tool);
}
@@ -1406,6 +1406,8 @@ gimp_filter_tool_update_filter (GimpFilterTool *filter_tool)
clip);
gimp_drawable_filter_set_region (filter_tool->filter,
options->region);
+ gimp_drawable_filter_set_preview (filter_tool->filter,
+ options->preview);
gimp_drawable_filter_set_preview_split (filter_tool->filter,
options->preview_split,
options->preview_alignment,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]