From 026e99c4414d282b7f3975f28f7ddf46827996d3 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 20 May 2023 19:59:58 +0000 Subject: [PATCH] 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. --- app/actions/edit-commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c index 8e8a8acaba..9e0157428d 100644 --- a/app/actions/edit-commands.c +++ b/app/actions/edit-commands.c @@ -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;