[gimp/gimp-2-10] app: behave as if "show all" is disabled in edit/buffers/DnD actions when keeping padding
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: behave as if "show all" is disabled in edit/buffers/DnD actions when keeping padding
- Date: Sun, 15 Sep 2019 13:42:35 +0000 (UTC)
commit 6088a747c0b85e8fb14d9b2744467313bf477ce4
Author: Ell <ell_se yahoo com>
Date: Sun Sep 15 16:25:20 2019 +0300
app: behave as if "show all" is disabled in edit/buffers/DnD actions when keeping padding
app/actions/buffers-commands.c | 6 ++++--
app/actions/edit-commands.c | 6 ++++--
app/display/gimpdisplayshell-dnd.c | 22 ++++++++++++++--------
3 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/app/actions/buffers-commands.c b/app/actions/buffers-commands.c
index 509c234622..d3398dfe77 100644
--- a/app/actions/buffers-commands.c
+++ b/app/actions/buffers-commands.c
@@ -74,8 +74,10 @@ buffers_paste_cmd_callback (GimpAction *action,
{
GimpDisplayShell *shell = gimp_display_get_shell (display);
- gimp_display_shell_untransform_viewport (shell, ! shell->show_all,
- &x, &y, &width, &height);
+ gimp_display_shell_untransform_viewport (
+ shell,
+ ! gimp_display_shell_get_infinite_canvas (shell),
+ &x, &y, &width, &height);
image = gimp_display_get_image (display);
}
diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c
index 9d37ca7e9e..00a8ed43bc 100644
--- a/app/actions/edit-commands.c
+++ b/app/actions/edit-commands.c
@@ -609,8 +609,10 @@ edit_paste (GimpDisplay *display,
/* the actual paste-type conversion happens in gimp_edit_paste() */
}
- gimp_display_shell_untransform_viewport (shell, ! shell->show_all,
- &x, &y, &width, &height);
+ gimp_display_shell_untransform_viewport (
+ shell,
+ ! gimp_display_shell_get_infinite_canvas (shell),
+ &x, &y, &width, &height);
if (gimp_edit_paste (image, drawable, paste,
paste_type, x, y, width, height))
diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c
index 4c8511e553..152ca45e6a 100644
--- a/app/display/gimpdisplayshell-dnd.c
+++ b/app/display/gimpdisplayshell-dnd.c
@@ -179,8 +179,10 @@ gimp_display_shell_dnd_position_item (GimpDisplayShell *shell,
gint x, y;
gint width, height;
- gimp_display_shell_untransform_viewport (shell, ! shell->show_all,
- &x, &y, &width, &height);
+ gimp_display_shell_untransform_viewport (
+ shell,
+ ! gimp_display_shell_get_infinite_canvas (shell),
+ &x, &y, &width, &height);
off_x = x + (width - item_width) / 2;
off_y = y + (height - item_height) / 2;
@@ -496,8 +498,10 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
buffer = GIMP_BUFFER (viewable);
- gimp_display_shell_untransform_viewport (shell, ! shell->show_all,
- &x, &y, &width, &height);
+ gimp_display_shell_untransform_viewport (
+ shell,
+ ! gimp_display_shell_get_infinite_canvas (shell),
+ &x, &y, &width, &height);
/* FIXME: popup a menu for selecting "Paste Into" */
@@ -569,10 +573,12 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
gint height = gimp_image_get_height (image);
if (gimp_display_get_image (shell->display))
- gimp_display_shell_untransform_viewport (shell,
- ! shell->show_all,
- &x, &y,
- &width, &height);
+ {
+ gimp_display_shell_untransform_viewport (
+ shell,
+ ! gimp_display_shell_get_infinite_canvas (shell),
+ &x, &y, &width, &height);
+ }
gimp_image_add_layers (image, new_layers,
GIMP_IMAGE_ACTIVE_PARENT, -1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]