[gimp] 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] 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:22:20 +0000 (UTC)
commit 7d0f63917e24b8240cb663a6ec06a46b5c697368
Author: Thomas Manni <thomas manni free fr>
Date: Fri May 8 20:15:59 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 | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/app/actions/buffers-commands.c b/app/actions/buffers-commands.c
index 030020e..40dfbc5 100644
--- a/app/actions/buffers-commands.c
+++ b/app/actions/buffers-commands.c
@@ -81,20 +81,15 @@ buffers_paste_as_new_cmd_callback (GtkAction *action,
if (buffer && gimp_container_have (container, GIMP_OBJECT (buffer)))
{
- GimpImage *image = gimp_context_get_image (context);
-
- if (image)
- {
- GtkWidget *widget = GTK_WIDGET (editor);
- 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 (gtk_widget_get_screen (widget)),
- gimp_widget_get_monitor (widget));
- g_object_unref (new_image);
- }
+ GtkWidget *widget = GTK_WIDGET (editor);
+ GimpImage *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 (gtk_widget_get_screen (widget)),
+ gimp_widget_get_monitor (widget));
+ g_object_unref (new_image);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]