changed the "fade-length" and "gradient-length" minimum values to 0.0 for

2003-04-13  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintoptions.c: changed the "fade-length" and
	"gradient-length" minimum values to 0.0 for compatibility with
	the PDB API.

	* app/paint/gimppaintcore.c (gimp_paint_core_get_color_from_gradient):
	check that gradient_length > 0.0 before dividing by it.

	* plug-ins/gfig/gfig.c (gfig_paint_callback): push an undo group
	around the paint operations (bug #110446).
This commit is contained in:
Sven Neumann 2003-04-13 13:55:09 +00:00 committed by Sven Neumann
parent 1501733056
commit c16bc592a0
4 changed files with 24 additions and 4 deletions

View File

@ -1,3 +1,15 @@
2003-04-13 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintoptions.c: changed the "fade-length" and
"gradient-length" minimum values to 0.0 for compatibility with
the PDB API.
* app/paint/gimppaintcore.c (gimp_paint_core_get_color_from_gradient):
check that gradient_length > 0.0 before dividing by it.
* plug-ins/gfig/gfig.c (gfig_paint_callback): push an undo group
around the paint operations (bug #110446).
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimptemplateview.c: made the names editable in the

View File

@ -802,7 +802,10 @@ gimp_paint_core_get_color_from_gradient (GimpPaintCore *core,
{
gdouble pos;
pos = (gdouble) core->pixel_dist / gradient_length;
if (gradient_length > 0.0)
pos = (gdouble) core->pixel_dist / gradient_length;
else
pos = 1.0;
/* for the once modes, set pos close to 1.0 after the first chunk */
if ((mode == GIMP_GRADIENT_ONCE_FORWARD ||

View File

@ -159,7 +159,7 @@ gimp_paint_options_class_init (GimpPaintOptionsClass *klass)
0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_FADE_LENGTH,
"fade-length", NULL,
1e-5, 32767.0, DEFAULT_FADE_LENGTH,
0.0, 32767.0, DEFAULT_FADE_LENGTH,
0);
GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_FADE_UNIT,
"fade-unit", NULL,
@ -171,7 +171,7 @@ gimp_paint_options_class_init (GimpPaintOptionsClass *klass)
DEFAULT_USE_GRADIENT, 0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_GRADIENT_LENGTH,
"gradient-length", NULL,
1e-5, 32767.0, DEFAULT_GRADIENT_LENGTH,
0.0, 32767.0, DEFAULT_GRADIENT_LENGTH,
0);
GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_GRADIENT_UNIT,
"gradient-unit", NULL,

View File

@ -691,7 +691,8 @@ run (gchar *name,
tile_height = gimp_tile_height ();
/* TMP Hack - clear any selections */
gimp_selection_clear (gfig_image);
if (! gimp_selection_is_empty (gfig_image))
gimp_selection_clear (gfig_image);
gimp_drawable_mask_bounds (drawable->drawable_id,
&sel_x1, &sel_y1, &sel_x2, &sel_y2);
@ -4602,6 +4603,8 @@ gfig_paint_callback (GtkWidget *widget,
if (bdesc)
mygimp_brush_set (bdesc->bname);
gimp_undo_push_group_start (gfig_image);
while (objs)
{
if (ccount == obj_show_single || obj_show_single == -1)
@ -4657,6 +4660,8 @@ gfig_paint_callback (GtkWidget *widget,
&& selopt.fill_when == FILL_AFTER)
paint_layer_fill ();
gimp_undo_push_group_end (gfig_image);
gimp_displays_flush ();
}