Uncovered buglet spawned by #5045 fix. edit_paste() now properly supplies

2000-01-16  Garry R. Osgood <gosgood@idt.net>
* app/global_edit.c
global_edit.c: Uncovered buglet spawned by #5045 fix.
edit_paste() now properly supplies a GimpImageType
parameter in the case where a GimpImage has no
active_drawable: occurs when the user invokes a
paste into an empty image.
This commit is contained in:
Garry R. Osgood 2000-01-16 09:34:45 +00:00 committed by Garry R. Osgood
parent 7d67c07428
commit 8029644a2d
4 changed files with 35 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2000-01-16 Garry R. Osgood <gosgood@idt.net>
* app/global_edit.c
global_edit.c Uncovered buglet spawned by #5045 fix.
edit_paste() now properly supplies a GimpImageType
parameter in the case where a GimpImage parameter has no
active_drawable: occurs when the user invokes a
paste into an empty image.
Sat Jan 15 22:27:56 CET 2000 Marc Lehmann <pcg@goof.com>
* libgimp/gimpenv.c, libgimp/color_selector.h,

View File

@ -285,10 +285,15 @@ edit_paste (GImage *gimage,
int x1, y1, x2, y2;
int cx, cy;
/* Make a new layer */
layer = layer_new_from_tiles (gimage, gimp_drawable_type_with_alpha(drawable), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
/* Make a new layer: iff drawable == NULL, user is pasting into an empty display. */
if(drawable != NULL)
layer = layer_new_from_tiles (gimage, gimp_drawable_type_with_alpha(drawable), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
else
layer = layer_new_from_tiles (gimage, gimp_image_base_type_with_alpha (gimage), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
if (layer)
{
/* Start a group undo */
@ -337,6 +342,7 @@ edit_paste (GImage *gimage,
else
return NULL;
}
int
edit_paste_as_new (GImage *invoke,

View File

@ -285,10 +285,15 @@ edit_paste (GImage *gimage,
int x1, y1, x2, y2;
int cx, cy;
/* Make a new layer */
layer = layer_new_from_tiles (gimage, gimp_drawable_type_with_alpha(drawable), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
/* Make a new layer: iff drawable == NULL, user is pasting into an empty display. */
if(drawable != NULL)
layer = layer_new_from_tiles (gimage, gimp_drawable_type_with_alpha(drawable), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
else
layer = layer_new_from_tiles (gimage, gimp_image_base_type_with_alpha (gimage), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
if (layer)
{
/* Start a group undo */
@ -337,6 +342,7 @@ edit_paste (GImage *gimage,
else
return NULL;
}
int
edit_paste_as_new (GImage *invoke,

View File

@ -285,10 +285,15 @@ edit_paste (GImage *gimage,
int x1, y1, x2, y2;
int cx, cy;
/* Make a new layer */
layer = layer_new_from_tiles (gimage, gimp_drawable_type_with_alpha(drawable), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
/* Make a new layer: iff drawable == NULL, user is pasting into an empty display. */
if(drawable != NULL)
layer = layer_new_from_tiles (gimage, gimp_drawable_type_with_alpha(drawable), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
else
layer = layer_new_from_tiles (gimage, gimp_image_base_type_with_alpha (gimage), paste,
_("Pasted Layer"), OPAQUE_OPACITY, NORMAL_MODE);
if (layer)
{
/* Start a group undo */
@ -337,6 +342,7 @@ edit_paste (GImage *gimage,
else
return NULL;
}
int
edit_paste_as_new (GImage *invoke,