[gnome-builder] sourceview: only set_overscroll_num_lines after chaining up



commit 907e6ab5293e5236f1ccd1afc217384b890a4de2
Author: Christian Hergert <chergert redhat com>
Date:   Sun Feb 24 15:00:07 2019 -0800

    sourceview: only set_overscroll_num_lines after chaining up
    
    Related #643

 src/libide/sourceview/ide-source-view.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index d37e73f5a..6c5ad3e94 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -4576,6 +4576,8 @@ ide_source_view_do_size_allocate_hack_cb (gpointer data)
 
   GTK_WIDGET_CLASS (ide_source_view_parent_class)->size_allocate (GTK_WIDGET (self), &alloc);
 
+  ide_source_view_set_overscroll_num_lines (self, priv->overscroll_num_lines);
+
   return G_SOURCE_REMOVE;
 }
 
@@ -4645,9 +4647,10 @@ ide_source_view_size_allocate (GtkWidget     *widget,
   g_assert (allocation != NULL);
 
   if (!ide_source_view_do_size_allocate_hack (self, allocation))
-    GTK_WIDGET_CLASS (ide_source_view_parent_class)->size_allocate (GTK_WIDGET (self), allocation);
-
-  ide_source_view_set_overscroll_num_lines (self, priv->overscroll_num_lines);
+    {
+      GTK_WIDGET_CLASS (ide_source_view_parent_class)->size_allocate (GTK_WIDGET (self), allocation);
+      ide_source_view_set_overscroll_num_lines (self, priv->overscroll_num_lines);
+    }
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]