vcl/unx/gtk3/gtk3gtkinst.cxx | 46 +++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 27 deletions(-)
New commits: commit 60c4a457bb75a3734be0636fb14a78e070a50666 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 27 14:57:35 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Mar 27 20:36:26 2020 +0100 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 <caol...@redhat.com> 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(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits