[gimp/gimp-2-10] app: add "show all" support to "Layer -> New from Visible"



commit bafb44064b29e867c29559f9a32498470ed4ddc5
Author: Ell <ell_se yahoo com>
Date:   Thu Sep 19 20:00:00 2019 +0300

    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 e7479cad47735dd6c422ff9c68a082023ff8becf)

 app/actions/layers-commands.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c
index 2c5ee76f6d..e211270ae6 100644
--- a/app/actions/layers-commands.c
+++ b/app/actions/layers-commands.c
@@ -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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]