change the "update" property and notify listeners (in particular

2004-11-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c (gimp_preview_toggle_callback):
	change the "update" property and notify listeners (in particular
	GimpDrawablePreview) before invalidating the preview. Plug-ins
	might (needlessly) look at the property to decide whether they
	need to redraw. Fixes bug #159816.

	* plug-ins/common/unsharp.c (preview_update): no need to look at
	the value of the "Preview" toggle. GimpPreview takes care this.
This commit is contained in:
Sven Neumann
2004-11-29 12:15:19 +00:00
committed by Sven Neumann
parent 6dbb1c3a64
commit 37f179aed3
3 changed files with 15 additions and 5 deletions

View File

@ -399,6 +399,8 @@ gimp_preview_toggle_callback (GtkWidget *toggle,
{
preview->update_preview = TRUE;
g_object_notify (G_OBJECT (preview), "update");
if (preview->timeout_id)
g_source_remove (preview->timeout_id);
@ -408,10 +410,10 @@ gimp_preview_toggle_callback (GtkWidget *toggle,
{
preview->update_preview = FALSE;
g_object_notify (G_OBJECT (preview), "update");
gimp_preview_draw (preview);
}
g_object_notify (G_OBJECT (preview), "update");
}
static void