Commit 6ad46f65 authored by Martin Nordholts's avatar Martin Nordholts

Bug 610587 - Zooming with zoom tool pans away from the cursor

Update lower and upper value of adjustments *before* we set the new
value, otherwise it will be erroneously clamped sometimes.
parent 4ca603e9
......@@ -132,14 +132,15 @@ gimp_display_shell_scale_update_scrollbars (GimpDisplayShell *shell)
g_object_freeze_notify (G_OBJECT (shell->hsbdata));
/* Update upper and lower value before we set the new value */
gimp_display_shell_scroll_setup_hscrollbar (shell, shell->offset_x);
g_object_set (shell->hsbdata,
"value", (gdouble) shell->offset_x,
"page-size", (gdouble) shell->disp_width,
"page-increment", (gdouble) shell->disp_width / 2,
NULL);
gimp_display_shell_scroll_setup_hscrollbar (shell, shell->offset_x);
g_object_thaw_notify (G_OBJECT (shell->hsbdata)); /* emits "changed" */
......@@ -147,14 +148,15 @@ gimp_display_shell_scale_update_scrollbars (GimpDisplayShell *shell)
g_object_freeze_notify (G_OBJECT (shell->vsbdata));
/* Update upper and lower value before we set the new value */
gimp_display_shell_scroll_setup_vscrollbar (shell, shell->offset_y);
g_object_set (shell->vsbdata,
"value", (gdouble) shell->offset_y,
"page-size", (gdouble) shell->disp_height,
"page-increment", (gdouble) shell->disp_height / 2,
NULL);
gimp_display_shell_scroll_setup_vscrollbar (shell, shell->offset_y);
g_object_thaw_notify (G_OBJECT (shell->vsbdata)); /* emits "changed" */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment