[gimp] 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] app: don't detroy cached data when disabling filter-tool preview
- Date: Thu, 2 Apr 2020 16:05:54 +0000 (UTC)
commit 912b36a8f813551f3da1f8151f3af14266954e9a
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.
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 b107054e04..c349772c66 100644
--- a/app/tools/gimpfiltertool.c
+++ b/app/tools/gimpfiltertool.c
@@ -713,6 +713,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);
@@ -722,8 +724,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);
}
@@ -1394,6 +1394,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]