Commit 1107d5a2 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

don't call gimp_edit_clear() if the selection mask is empty after

2007-11-15  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/screenshot.c: don't call gimp_edit_clear() if
	the selection mask is empty after selecting the window shape and
	inverting that selection. Fixes bug #493182.


svn path=/trunk/; revision=24167
parent e35f701b
2007-11-15 Sven Neumann <sven@gimp.org>
* plug-ins/common/screenshot.c: don't call gimp_edit_clear() if
the selection mask is empty after selecting the window shape and
inverting that selection. Fixes bug #493182.
2007-11-15 Sven Neumann <sven@gimp.org>
* plug-ins/common/tiff-save.c (save_image): fixed bug in colormap
......
......@@ -497,6 +497,7 @@ select_window_x11 (GdkScreen *screen)
shootvals.x2 = shootvals.x1 = x_event.xbutton.x_root;
shootvals.y2 = shootvals.y1 = x_event.xbutton.y_root;
}
buttons++;
break;
......@@ -749,9 +750,11 @@ image_select_shape (gint32 image,
gdk_region_get_rectangles (shape, &rects, &num_rects);
for (i = 0; i < num_rects; i++)
gimp_rect_select (image,
rects[i].x, rects[i].y, rects[i].width, rects[i].height,
GIMP_CHANNEL_OP_ADD, FALSE, 0);
{
gimp_rect_select (image,
rects[i].x, rects[i].y, rects[i].width, rects[i].height,
GIMP_CHANNEL_OP_ADD, FALSE, 0);
}
g_free (rects);
......@@ -794,6 +797,7 @@ create_image (GdkPixbuf *pixbuf,
gimp_image_parasite_attach (image, parasite);
gimp_parasite_free (parasite);
g_free (comment);
}
......@@ -806,9 +810,13 @@ create_image (GdkPixbuf *pixbuf,
if (shape && ! gdk_region_empty (shape))
{
image_select_shape (image, shape);
gimp_layer_add_alpha (layer);
gimp_edit_clear (layer);
gimp_selection_none (image);
if (! gimp_selection_is_empty (image))
{
gimp_layer_add_alpha (layer);
gimp_edit_clear (layer);
gimp_selection_none (image);
}
}
gimp_image_undo_enable (image);
......
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