From 325d7541c771419cdd37f54838079a53ecdd9cc7 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 25 Apr 2013 09:41:21 +0200 Subject: [PATCH] app: always show the tool progress in the center of the canvas getting rid of one more untransform_viewport(). --- app/tools/gimptool-progress.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/tools/gimptool-progress.c b/app/tools/gimptool-progress.c index a3e8a81d5c..1f2a136ebe 100644 --- a/app/tools/gimptool-progress.c +++ b/app/tools/gimptool-progress.c @@ -84,18 +84,21 @@ gimp_tool_progress_start (GimpProgress *progress, { GimpTool *tool = GIMP_TOOL (progress); GimpDisplayShell *shell; - gint x, y, w, h; + gint x, y; g_return_val_if_fail (GIMP_IS_DISPLAY (tool->display), NULL); g_return_val_if_fail (tool->progress == NULL, NULL); shell = gimp_display_get_shell (tool->display); - gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h); + x = shell->disp_width / 2; + y = shell->disp_height / 2; + + gimp_display_shell_unzoom_xy (shell, x, y, &x, &y, FALSE); tool->progress = gimp_canvas_progress_new (shell, GIMP_HANDLE_ANCHOR_CENTER, - x + w / 2, y + h / 2); + x, y); gimp_display_shell_add_unrotated_item (shell, tool->progress); g_object_unref (tool->progress);