[gimp] Bug 610587 - Zooming with zoom tool pans away from the cursor
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 610587 - Zooming with zoom tool pans away from the cursor
- Date: Sat, 19 Jun 2010 06:05:59 +0000 (UTC)
commit 6ad46f651a8cb0ffda61e9c99ca4758221b10917
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Jun 19 08:09:34 2010 +0200
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.
app/display/gimpdisplayshell-scale.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-scale.c b/app/display/gimpdisplayshell-scale.c
index 859f913..d8d5976 100644
--- a/app/display/gimpdisplayshell-scale.c
+++ b/app/display/gimpdisplayshell-scale.c
@@ -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" */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]