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

@ -1,3 +1,14 @@
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.
2004-11-29 DindinX <dindinx@gimp.org>
* plug-ins/gfig/gfig-dialog.c: issue a repaint after the

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

View File

@ -758,9 +758,6 @@ preview_update (GimpPreview *preview)
GimpPixelRgn srcPR, destPR; /* Pixel regions */
if (!unsharp_params.update_preview)
return;
drawable =
gimp_drawable_preview_get_drawable (GIMP_DRAWABLE_PREVIEW (preview));