diff --git a/ChangeLog b/ChangeLog index 611e5060c3..09f75fbc02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-10-12 Michael Natterer + + * app/actions/drawable-commands.c (drawable_rotate_cmd_callback): + if the drawable is a channel, pass clip_result as FALSE. Need to + do this here for rotating only because it can't be decided + generically in GimpChannel. Fixes crash when rotating channels + or layer masks. + + Use the undo_desc from GimpItemClass instead of passing "Flip + Layer" and "Rotate Layer". + 2004-10-12 Sven Neumann * app/file/file-open.c: minor cleanup. diff --git a/app/actions/drawable-commands.c b/app/actions/drawable-commands.c index 164a1cf3c1..df3c812c1f 100644 --- a/app/actions/drawable-commands.c +++ b/app/actions/drawable-commands.c @@ -25,7 +25,7 @@ #include "actions-types.h" #include "core/gimp.h" -#include "core/gimpdrawable.h" +#include "core/gimpchannel.h" #include "core/gimpdrawable-desaturate.h" #include "core/gimpdrawable-equalize.h" #include "core/gimpdrawable-invert.h" @@ -186,7 +186,7 @@ drawable_flip_cmd_callback (GtkAction *action, if (gimp_item_get_linked (item)) gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM, - _("Flip Layer")); + GIMP_ITEM_GET_CLASS (item)->flip_desc); gimp_item_flip (item, context, (GimpOrientationType) value, axis, FALSE); @@ -211,6 +211,7 @@ drawable_rotate_cmd_callback (GtkAction *action, GimpItem *item; gint off_x, off_y; gdouble center_x, center_y; + gboolean clip_result = FALSE; return_if_no_drawable (gimage, drawable, data); return_if_no_context (context, data); @@ -223,10 +224,13 @@ drawable_rotate_cmd_callback (GtkAction *action, if (gimp_item_get_linked (item)) gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM, - _("Rotate Layer")); + GIMP_ITEM_GET_CLASS (item)->rotate_desc); + + if (GIMP_IS_CHANNEL (item)) + clip_result = TRUE; gimp_item_rotate (item, context, (GimpRotationType) value, - center_x, center_y, FALSE); + center_x, center_y, clip_result); if (gimp_item_get_linked (item)) {