actions: Restore pasting image in empty workspace

In !769, I accidentally removed the ability to paste into an empty
workspace with Ctrl+V since I added a "does image exist?" check before
the `edit_paste_as_new_image_cmd_callback ()` call.
This patch resolves the issue by moving the check after the
"paste as image" function call.
This commit is contained in:
Alx Sa 2023-05-20 19:59:58 +00:00
parent 9b388f873b
commit 026e99c441
1 changed files with 3 additions and 3 deletions

View File

@ -349,9 +349,7 @@ edit_paste_cmd_callback (GimpAction *action,
GList *drawables;
gboolean merged = FALSE;
return_if_no_image (image, data);
if (paste_type == GIMP_PASTE_TYPE_FLOATING)
if (paste_type == GIMP_PASTE_TYPE_NEW_LAYER_OR_FLOATING)
{
if (! display || ! gimp_display_get_image (display))
{
@ -360,6 +358,8 @@ edit_paste_cmd_callback (GimpAction *action,
}
}
return_if_no_image (image, data);
if (! display)
return;