mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
7ec033d896
commit
912b36a8f8
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue