app: add "show all" support to "Layer -> New from Visible"

When in "show all" mode and canvas padding is disabled, have the
"layers-new-from-visible" action create a new layer from the full
image content, rather than just the canvas content.

(cherry picked from commit e7479cad47)
This commit is contained in:
Ell
2019-09-19 20:00:00 +03:00
parent 7132dd0355
commit bafb44064b

View File

@ -427,12 +427,14 @@ layers_new_from_visible_cmd_callback (GimpAction *action,
gpointer data)
{
GimpImage *image;
GimpDisplayShell *shell;
GimpLayer *layer;
GimpPickable *pickable;
GimpColorProfile *profile;
return_if_no_image (image, data);
return_if_no_shell (shell, data);
pickable = GIMP_PICKABLE (image);
pickable = gimp_display_shell_get_canvas_pickable (shell);
gimp_pickable_flush (pickable);