[gimp] 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] app: behave as if "show all" is disabled in edit/buffers/DnD actions when keeping padding
- Date: Sun, 15 Sep 2019 13:43:05 +0000 (UTC)
commit 3cef5b52ac303d4608e104f93f289d5261a0e44c
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 ef8f29212c..14077fee19 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 a6a740b057..879eb6cad6 100644
--- a/app/actions/edit-commands.c
+++ b/app/actions/edit-commands.c
@@ -610,8 +610,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 3d7366d80e..20651202a0 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;
@@ -494,8 +496,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" */
@@ -567,10 +571,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]