Commit 8a8ab4c2 authored by Sven Neumann's avatar Sven Neumann

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
parent 489e5ab2
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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
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