From dded69dcc8d57a960adceb3638670daa2ef6467f Mon Sep 17 00:00:00 2001 From: Dave Neary Date: Wed, 17 Nov 2004 21:49:08 +0000 Subject: [PATCH] Fixed initialisation issue that was crashing the plug-in on repeat runs. 2004-11-17 Dave Neary * plug-ins/common/bumpmap.c: Fixed initialisation issue that was crashing the plug-in on repeat runs. Fixes bug #158494. --- ChangeLog | 6 ++++++ plug-ins/common/bumpmap.c | 22 ++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7aa814ed2b..53adeabca6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-17 Dave Neary + + * plug-ins/common/bumpmap.c: Fixed initialisation issue + that was crashing the plug-in on repeat runs. Fixes bug + #158494. + 2004-11-17 Sven Neumann * app/dialogs/print-size-dialog.c: added missing callbacks for the diff --git a/plug-ins/common/bumpmap.c b/plug-ins/common/bumpmap.c index f01d3a43ba..8590aa4b5e 100644 --- a/plug-ins/common/bumpmap.c +++ b/plug-ins/common/bumpmap.c @@ -1042,6 +1042,14 @@ bumpmap_dialog (void) G_CALLBACK (gimp_preview_invalidate), preview); + /* Initialise drawable (don't initialise offsets if bumpmap_id is + already known)*/ + if (bmvals.bumpmap_id == -1) + dialog_new_bumpmap (TRUE); + else + dialog_new_bumpmap (FALSE); + + /* Done */ gtk_widget_show (dialog); @@ -1471,19 +1479,5 @@ static void dialog_bumpmap_callback (GtkWidget *widget, GimpPreview *preview) { - gint value; - - gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value); - - if (bmvals.bumpmap_id == value) - { - dialog_new_bumpmap (FALSE); - } - else - { - bmvals.bumpmap_id = value; - dialog_new_bumpmap (TRUE); - } - gimp_preview_invalidate (preview); }