Commit 978c464b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

return TRUE only if the selection intersects with the viewport, as

2005-11-14  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_mask_bounds):
	return TRUE only if the selection intersects with the viewport, as
	expected by gimp_display_shell_selection_invis(), which is the
	only caller of this function. Fixes bug #319029.
parent 174d09d4
2005-11-14 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_mask_bounds):
return TRUE only if the selection intersects with the viewport, as
expected by gimp_display_shell_selection_invis(), which is the
only caller of this function. Fixes bug #319029.
2005-11-13 Sven Neumann <sven@gimp.org>
* plug-ins/sgi/sgi.c (run): fixed cut'n'paste bug that broke saving.
......
......@@ -1193,8 +1193,6 @@ gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gint *y2)
{
GimpLayer *layer;
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
g_return_val_if_fail (x1 != NULL, FALSE);
......@@ -1205,6 +1203,9 @@ gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
/* If there is a floating selection, handle things differently */
if ((layer = gimp_image_floating_sel (shell->gdisp->gimage)))
{
gint off_x;
gint off_y;
gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y);
if (! gimp_channel_bounds (gimp_image_get_mask (shell->gdisp->gimage),
......@@ -1238,7 +1239,7 @@ gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
*x2 = CLAMP (*x2, 0, shell->disp_width);
*y2 = CLAMP (*y2, 0, shell->disp_height);
return TRUE;
return ((*x2 - *x1) > 0) && ((*y2 - *y1) > 0);
}
void
......
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