From f4a7da1ee33a0603f7746e28feae061c5954ee84 Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 29 Sep 2025 17:28:33 +0200 Subject: [PATCH] =?UTF-8?q?app,=20pdb:=20similar=20to=20the=20previous=20c?= =?UTF-8?q?ommit,=20but=20for=20files=20loaded=20with=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … gimp_file_load(). We make sure that the load procedure associated to the file is the one used for the inner-file (in case of imbricated files into container formats). Also let's set the imported file unless it's a XCF inner format. --- app/pdb/file-cmds.c | 11 ++++++++++- pdb/groups/file.pdb | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/pdb/file-cmds.c b/app/pdb/file-cmds.c index 145c0b9dc4..b30e299400 100644 --- a/app/pdb/file-cmds.c +++ b/app/pdb/file-cmds.c @@ -112,7 +112,16 @@ file_load_invoker (GimpProcedure *procedure, { GimpImage *image = g_value_get_object (gimp_value_array_index (return_vals, 1)); - gimp_image_set_load_proc (image, file_proc); + + if (! gimp_image_get_load_proc (image)) + /* Leave the initial load procedure if it already exists as + * it will give information about the source format. See + * similar code in file_open_image(). + */ + gimp_image_set_load_proc (image, file_proc); + + if (! gimp_image_get_file (image)) + gimp_image_set_imported_file (image, file); } } diff --git a/pdb/groups/file.pdb b/pdb/groups/file.pdb index 6974f4b4b4..921900ad10 100644 --- a/pdb/groups/file.pdb +++ b/pdb/groups/file.pdb @@ -104,7 +104,16 @@ HELP { GimpImage *image = g_value_get_object (gimp_value_array_index (return_vals, 1)); - gimp_image_set_load_proc (image, file_proc); + + if (! gimp_image_get_load_proc (image)) + /* Leave the initial load procedure if it already exists as + * it will give information about the source format. See + * similar code in file_open_image(). + */ + gimp_image_set_load_proc (image, file_proc); + + if (! gimp_image_get_file (image)) + gimp_image_set_imported_file (image, file); } }