diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-27 14:57:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-27 20:36:26 +0100 |
commit | 60c4a457bb75a3734be0636fb14a78e070a50666 (patch) | |
tree | 97d8ba5a6f07f38c749715d897c59db8e1b60099 /vcl | |
parent | 811b36e4db240be3a21a4d184b085630efcc09b7 (diff) |
no need to special case 0
and the impress animation pane show the need to not special case 0
in the effect list
Change-Id: I806365df1a77b58b8d4f474d945f7a7e50c53757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91231
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 03386b798f17..0656f08a8a65 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -10858,37 +10858,29 @@ public: { disable_notify_events(); - if (value == 0) - { - gtk_adjustment_set_value(m_pVAdjustment, 0); - m_nPendingVAdjustment = -1; - } - else - { - /* This rube goldberg device is to remove flicker from setting the - scroll position of a GtkTreeView directly after clearing it and - filling it. As a specific example the writer navigator with ~100 - tables, scroll to the end, right click on an entry near the end - and rename it, the tree is cleared and refilled and an attempt - made to set the scroll position of the freshly refilled tree to - the same point as before the clear. - */ + /* This rube goldberg device is to remove flicker from setting the + scroll position of a GtkTreeView directly after clearing it and + filling it. As a specific example the writer navigator with ~100 + tables, scroll to the end, right click on an entry near the end + and rename it, the tree is cleared and refilled and an attempt + made to set the scroll position of the freshly refilled tree to + the same point as before the clear. + */ - // This forces the tree to recalculate now its preferred size - // after being cleared - GtkRequisition size; - gtk_widget_get_preferred_size(GTK_WIDGET(m_pTreeView), nullptr, &size); + // This forces the tree to recalculate now its preferred size + // after being cleared + GtkRequisition size; + gtk_widget_get_preferred_size(GTK_WIDGET(m_pTreeView), nullptr, &size); - m_nPendingVAdjustment = value; + m_nPendingVAdjustment = value; - // The value set here just has to be different to the final value - // set later so that isn't a no-op - gtk_adjustment_set_value(m_pVAdjustment, value - 0.0001); + // The value set here just has to be different to the final value + // set later so that isn't a no-op + gtk_adjustment_set_value(m_pVAdjustment, value - 0.0001); - // This will set the desired m_nPendingVAdjustment value right - // before the tree gets drawn - gtk_widget_add_tick_callback(GTK_WIDGET(m_pTreeView), setAdjustmentCallback, this, nullptr); - } + // This will set the desired m_nPendingVAdjustment value right + // before the tree gets drawn + gtk_widget_add_tick_callback(GTK_WIDGET(m_pTreeView), setAdjustmentCallback, this, nullptr); enable_notify_events(); } |