[gnome-builder] symbol-tree: only trace when we are updating tree



commit a34c0226e2a04473ee4c5790fe670791232a3ce1
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 4 13:58:16 2016 +0300

    symbol-tree: only trace when we are updating tree

 plugins/symbol-tree/symbol-tree-panel.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/plugins/symbol-tree/symbol-tree-panel.c b/plugins/symbol-tree/symbol-tree-panel.c
index dbe1b28..26c6ae6 100644
--- a/plugins/symbol-tree/symbol-tree-panel.c
+++ b/plugins/symbol-tree/symbol-tree-panel.c
@@ -121,13 +121,11 @@ refresh_tree (SymbolTreePanel *self)
   IdeBuffer *document = NULL;
   gsize change_count = 0;
 
-  IDE_ENTRY;
-
   g_assert (SYMBOL_IS_TREE_PANEL (self));
 
   workbench = IDE_WORKBENCH (gtk_widget_get_ancestor (GTK_WIDGET (self), IDE_TYPE_WORKBENCH));
   if (workbench == NULL)
-    IDE_EXIT;
+    return;
 
   perspective = ide_workbench_get_perspective_by_name (workbench, "editor");
   g_assert (perspective != NULL);
@@ -142,6 +140,8 @@ refresh_tree (SymbolTreePanel *self)
 
   if ((document != self->last_document) || (self->last_change_count < change_count))
     {
+      IDE_PROBE;
+
       ide_clear_source (&self->refresh_tree_timeout);
 
       self->last_document = document;
@@ -176,8 +176,6 @@ refresh_tree (SymbolTreePanel *self)
                                     g_object_ref (self));
         }
     }
-
-  IDE_EXIT;
 }
 
 static void


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