[gimp] Get rid of using gimp_image_get_layer_by_index() in gimpimage.c



commit d7fa10c7080999ed97f58d5618f4abc519ddd914
Author: Michael Natterer <mitch gimp org>
Date:   Sun Aug 2 15:43:04 2009 +0200

    Get rid of using gimp_image_get_layer_by_index() in gimpimage.c

 app/core/gimpimage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 13c5805..5818cf7 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1615,7 +1615,7 @@ gimp_image_has_alpha (const GimpImage *image)
 
   g_return_val_if_fail (GIMP_IS_IMAGE (image), TRUE);
 
-  layer = gimp_image_get_layer_by_index (image, 0);
+  layer = GIMP_LAYER (gimp_container_get_first_child (image->layers));
 
   return ((gimp_image_get_n_layers (image) > 1) ||
           (layer && gimp_drawable_has_alpha (GIMP_DRAWABLE (layer))));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]