[gimp] python: use gimp_image_insert_layer() instead of add_layer()
- From: Sven Neumann <neo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] python: use gimp_image_insert_layer() instead of add_layer()
- Date: Mon, 6 Sep 2010 21:59:32 +0000 (UTC)
commit 48f621958584745c2ad99769f40418281fb4f93c
Author: Sven Neumann <sven gimp org>
Date: Mon Sep 6 23:31:04 2010 +0200
python: use gimp_image_insert_layer() instead of add_layer()
plug-ins/pygimp/pygimp-image.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/pygimp/pygimp-image.c b/plug-ins/pygimp/pygimp-image.c
index 55dc288..200e0e3 100644
--- a/plug-ins/pygimp/pygimp-image.c
+++ b/plug-ins/pygimp/pygimp-image.c
@@ -33,7 +33,7 @@ img_add_channel(PyGimpImage *self, PyObject *args)
&PyGimpChannel_Type, &chn, &pos))
return NULL;
- if (!gimp_image_add_channel(self->ID, chn->ID, pos)) {
+ if (!gimp_image_insert_channel(self->ID, chn->ID, -1, pos)) {
PyErr_Format(pygimp_error,
"could not add channel (ID %d) to image (ID %d)",
chn->ID, self->ID);
@@ -54,7 +54,7 @@ img_add_layer(PyGimpImage *self, PyObject *args)
&pos))
return NULL;
- if (!gimp_image_add_layer(self->ID, lay->ID, pos)) {
+ if (!gimp_image_insert_layer(self->ID, lay->ID, -1, pos)) {
PyErr_Format(pygimp_error,
"could not add layer (ID %d) to image (ID %d)",
lay->ID, self->ID);
@@ -133,7 +133,7 @@ img_new_layer(PyGimpImage *self, PyObject *args, PyObject *kwargs)
return NULL;
}
- if (!gimp_image_add_layer(self->ID, layer_id, pos)) {
+ if (!gimp_image_insert_layer(self->ID, layer_id, -1, pos)) {
gimp_drawable_delete(layer_id);
PyErr_Format(pygimp_error,
"could not add layer (ID %d) to image (ID %d)",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]