[gimp] app: don't keep images from the clipboard in gimp->images
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't keep images from the clipboard in gimp->images
- Date: Sun, 18 Sep 2016 19:57:53 +0000 (UTC)
commit 0740d8d688972e241113a8d9e3ce27d8a2bf1cbe
Author: Michael Natterer <mitch gimp org>
Date: Sun Sep 18 21:56:47 2016 +0200
app: don't keep images from the clipboard in gimp->images
They are temporary internal objects. In gimp->images they would
be visible in the GUI and PDB.
app/widgets/gimpselectiondata.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpselectiondata.c b/app/widgets/gimpselectiondata.c
index 8ac8a48..597cd87 100644
--- a/app/widgets/gimpselectiondata.c
+++ b/app/widgets/gimpselectiondata.c
@@ -377,7 +377,12 @@ gimp_selection_data_get_xcf (GtkSelectionData *selection,
image = xcf_load_stream (gimp, input, NULL, NULL, &error);
- if (! image)
+ if (image)
+ {
+ /* don't keep clipboard images in the image list */
+ gimp_container_remove (gimp->images, GIMP_OBJECT (image));
+ }
+ else
{
g_warning ("Recieved invalid XCF data: %s", error->message);
g_clear_error (&error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]