Commit 541ea2bf authored by Morten Welinder's avatar Morten Welinder

GUI: Improve workaround for scrollbar bug.

This prevents an update storm.
parent 8955972d
2018-01-11 Morten Welinder <terra@gnome.org>
* src/sheet-control-gui.c (scg_scrollbar_config_real): Be careful
not to trigger an update storm when nothing changes. Fixes
#792417.
2018-01-01 Morten Welinder <terra@gnome.org>
* src/expr.c (gnm_expr_simplify_if): Remove non-working,
......
......@@ -5,6 +5,7 @@ Morten:
* Fix ISREF.
* Some internal array formula code cleanups.
* Fix problem with stopping a glpk solver.
* Improve workaround for gtk+ scrollbar bug. [#792417]
--------------------------------------------------------------------------
Gnumeric 1.12.38
......
......@@ -455,6 +455,32 @@ scg_resize_virt (SheetControl *sc, gboolean force_scroll)
scg_resize ((SheetControlGUI *)sc, force_scroll);
}
static void
gnm_adjustment_configure (GtkAdjustment *adjustment,
gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size)
{
g_object_freeze_notify (G_OBJECT (adjustment));
// These do nothing if value isn't changed
gtk_adjustment_set_lower (adjustment, lower);
gtk_adjustment_set_upper (adjustment, upper);
gtk_adjustment_set_step_increment (adjustment, step_increment);
gtk_adjustment_set_page_increment (adjustment, page_increment);
gtk_adjustment_set_page_size (adjustment, page_size);
g_object_thaw_notify (G_OBJECT (adjustment));
// These fire signals if nothing changes, so check by hand
if (!(gtk_adjustment_get_value (adjustment) == value))
gtk_adjustment_set_value (adjustment, value);
}
/**
* scg_scrollbar_config :
* @sc:
......@@ -492,7 +518,7 @@ scg_scrollbar_config_real (SheetControl const *sc)
max_row = sheet->rows.max_used;
if (max_row < sheet->max_object_extent.row)
max_row = sheet->max_object_extent.row;
gtk_adjustment_configure
gnm_adjustment_configure
(va,
pane->first.row,
sv_is_frozen (sv) ? sv->unfrozen_top_left.row : 0,
......@@ -505,7 +531,7 @@ scg_scrollbar_config_real (SheetControl const *sc)
max_col = sheet->cols.max_used;
if (max_col < sheet->max_object_extent.col)
max_col = sheet->max_object_extent.col;
gtk_adjustment_configure
gnm_adjustment_configure
(ha,
pane->first.col,
sv_is_frozen (sv) ? sv->unfrozen_top_left.col : 0,
......
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