In edit_clear and edit_fill return TRUE if the selection

is empty, since the operation succeded by doing nothing.
Returning FALSE here crashed lots of script-fus.


--Sven
This commit is contained in:
Sven Neumann 2000-01-22 17:53:23 +00:00
parent 489e5ab29e
commit 8a8ab4c245
4 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,9 @@
Sat Jan 22 18:50:18 CET 2000 Sven Neumann <sven@gimp.org>
* app/global_edit.c: in edit_clear and edit_fill return TRUE if the
selection is empty, since the operation succeded by doing nothing.
Returning FALSE here crashed lots of script-fus.
Sat Jan 22 16:00:52 CET 2000 Sven Neumann <sven@gimp.org>
* app/commands.c

View File

@ -399,7 +399,7 @@ edit_clear (GImage *gimage,
drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (!(x2 - x1) || !(y2 - y1))
return FALSE;
return TRUE; /* nothing to do, but the clear succeded */
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), drawable_bytes (drawable));
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);
@ -437,8 +437,8 @@ edit_fill (GImage *gimage,
drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (!(x2 - x1) || !(y2 - y1))
return FALSE;
return TRUE; /* nothing to do, but the fill succeded */
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), drawable_bytes (drawable));
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);
color_region (&bufPR, col);

View File

@ -399,7 +399,7 @@ edit_clear (GImage *gimage,
drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (!(x2 - x1) || !(y2 - y1))
return FALSE;
return TRUE; /* nothing to do, but the clear succeded */
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), drawable_bytes (drawable));
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);
@ -437,8 +437,8 @@ edit_fill (GImage *gimage,
drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (!(x2 - x1) || !(y2 - y1))
return FALSE;
return TRUE; /* nothing to do, but the fill succeded */
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), drawable_bytes (drawable));
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);
color_region (&bufPR, col);

View File

@ -399,7 +399,7 @@ edit_clear (GImage *gimage,
drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (!(x2 - x1) || !(y2 - y1))
return FALSE;
return TRUE; /* nothing to do, but the clear succeded */
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), drawable_bytes (drawable));
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);
@ -437,8 +437,8 @@ edit_fill (GImage *gimage,
drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
if (!(x2 - x1) || !(y2 - y1))
return FALSE;
return TRUE; /* nothing to do, but the fill succeded */
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), drawable_bytes (drawable));
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);
color_region (&bufPR, col);