[gimp/soc-2010-cage] Bug 610587 - Zooming with zoom tool pans away from the cursor
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage] Bug 610587 - Zooming with zoom tool pans away from the cursor
- Date: Wed, 30 Jun 2010 22:10:48 +0000 (UTC)
commit 00a606f2fb284af12612ee2d2318d7719acfd1d0
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]