mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 12:32:37 +00:00
emit "alpha_changed" if the drawable got/lost an alpha channel by setting
2004-03-15 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): emit "alpha_changed" if the drawable got/lost an alpha channel by setting the new tiles. * app/core/gimpimage-undo-push.c (undo_pop_layer_mod) * app/core/gimplayer.c (gimp_layer_add_alpha): removed explicit calls to gimp_drawable_alpha_changed().
This commit is contained in:
parent
caa462bfd8
commit
d376ac5d5e
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-03-15 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): emit
|
||||
"alpha_changed" if the drawable got/lost an alpha channel by
|
||||
setting the new tiles.
|
||||
|
||||
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
|
||||
* app/core/gimplayer.c (gimp_layer_add_alpha): removed explicit
|
||||
calls to gimp_drawable_alpha_changed().
|
||||
|
||||
2004-03-15 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Closer to text layer undo:
|
||||
|
|
|
@ -600,8 +600,12 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable,
|
|||
TileManager *tiles,
|
||||
GimpImageType type)
|
||||
{
|
||||
gboolean old_has_alpha;
|
||||
|
||||
g_return_if_fail (tile_manager_bpp (tiles) == GIMP_IMAGE_TYPE_BYTES (type));
|
||||
|
||||
old_has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
|
||||
if (drawable->tiles)
|
||||
tile_manager_unref (drawable->tiles);
|
||||
|
||||
|
@ -609,6 +613,9 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable,
|
|||
drawable->type = type;
|
||||
drawable->bytes = tile_manager_bpp (tiles);
|
||||
drawable->has_alpha = GIMP_IMAGE_TYPE_HAS_ALPHA (type);
|
||||
|
||||
if (old_has_alpha != gimp_drawable_has_alpha (drawable))
|
||||
gimp_drawable_alpha_changed (drawable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1426,12 +1426,10 @@ undo_pop_layer_mod (GimpUndo *undo,
|
|||
}
|
||||
|
||||
if (GIMP_IMAGE_TYPE_HAS_ALPHA (GIMP_DRAWABLE (layer)->type) !=
|
||||
GIMP_IMAGE_TYPE_HAS_ALPHA (lmu->type))
|
||||
GIMP_IMAGE_TYPE_HAS_ALPHA (lmu->type) &&
|
||||
undo->gimage->layers->num_children == 1)
|
||||
{
|
||||
gimp_drawable_alpha_changed (GIMP_DRAWABLE (layer));
|
||||
|
||||
if (undo->gimage->layers->num_children == 1)
|
||||
gimp_image_alpha_changed (undo->gimage);
|
||||
gimp_image_alpha_changed (undo->gimage);
|
||||
}
|
||||
|
||||
if (GIMP_ITEM (layer)->width != tile_manager_width (lmu->tiles) ||
|
||||
|
|
|
@ -1406,8 +1406,6 @@ gimp_layer_add_alpha (GimpLayer *layer)
|
|||
|
||||
GIMP_DRAWABLE (layer)->preview_valid = FALSE;
|
||||
|
||||
gimp_drawable_alpha_changed (GIMP_DRAWABLE (layer));
|
||||
|
||||
if (gimp_container_num_children (gimage->layers) == 1)
|
||||
gimp_image_alpha_changed (gimage);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue