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.
This commit is contained in:
Michael Natterer 2016-09-18 21:56:47 +02:00
parent 5136f131be
commit 0740d8d688
1 changed files with 6 additions and 1 deletions

View File

@ -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);