[gimp/gimp-2-8] Bug 749133 - Named buffer: "Paste selected buffer as a new image" does not work when there is no ima
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 749133 - Named buffer: "Paste selected buffer as a new image" does not work when there is no ima
- Date: Fri, 8 May 2015 18:36:48 +0000 (UTC)
commit 4f32c496cf7e4ea70b21b54b79cd10ccf6bd2aee
Author: Thomas Manni <thomas manni free fr>
Date: Fri May 8 20:25:55 2015 +0200
Bug 749133 - Named buffer: "Paste selected buffer as a new image" does not work when there is no image
Enable pasting a named buffer when there is no image.
app/actions/buffers-commands.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/app/actions/buffers-commands.c b/app/actions/buffers-commands.c
index f288adb..156f2f6 100644
--- a/app/actions/buffers-commands.c
+++ b/app/actions/buffers-commands.c
@@ -80,17 +80,12 @@ buffers_paste_as_new_cmd_callback (GtkAction *action,
if (buffer && gimp_container_have (container, GIMP_OBJECT (buffer)))
{
- GimpImage *image = gimp_context_get_image (context);
+ GimpImage *new_image;
- if (image)
- {
- GimpImage *new_image;
-
- new_image = gimp_image_new_from_buffer (image->gimp, image, buffer);
- gimp_create_display (image->gimp, new_image,
- GIMP_UNIT_PIXEL, 1.0);
- g_object_unref (new_image);
- }
+ new_image = gimp_image_new_from_buffer (context->gimp, NULL, buffer);
+ gimp_create_display (context->gimp, new_image,
+ GIMP_UNIT_PIXEL, 1.0);
+ g_object_unref (new_image);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]