Commit df603488 authored by Akkana Peck's avatar Akkana Peck

Fix variable used uninitialized warnings.

Set upper bound to the size of the image, though the size_entry
seems to ignore upper and lower bounds anyway.
parent ad17eeb8
......@@ -348,7 +348,7 @@ borderaverage_dialog (gint32 image_ID,
GtkSizeGroup *group;
gboolean run;
gdouble xres, yres;
gint width, height;
GeglBuffer *buffer = NULL;
const gchar *labels[] =
{ "1", "2", "4", "8", "16", "32", "64", "128", "256" };
......@@ -406,8 +406,11 @@ borderaverage_dialog (gint32 image_ID,
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (size_entry), 0, xres, TRUE);
/* set the size (in pixels) that will be treated as 0% and 100% */
gimp_size_entry_set_size (GIMP_SIZE_ENTRY (size_entry), 0, 0.0,
MIN (width, height));
buffer = gimp_drawable_get_buffer (drawable_id);
if (buffer)
gimp_size_entry_set_size (GIMP_SIZE_ENTRY (size_entry), 0, 0.0,
MIN (gegl_buffer_get_width(buffer),
gegl_buffer_get_height(buffer)));
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (size_entry), 0,
1.0, 256.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment