From 4822b02f2e5a3511ff34ecd2b516ce846b22b5ea Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 25 Jul 2023 14:16:59 -0700 Subject: [PATCH] sysprof: clear some models when changing callgraph view This is just more attempt to avoid some listmodel issues. --- src/sysprof/sysprof-callgraph-view.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/sysprof/sysprof-callgraph-view.c b/src/sysprof/sysprof-callgraph-view.c index b2ee7c5a..1f6f1d0d 100644 --- a/src/sysprof/sysprof-callgraph-view.c +++ b/src/sysprof/sysprof-callgraph-view.c @@ -315,11 +315,17 @@ make_descendant_root_action (GtkWidget *widget, SysprofSymbol *symbol = sysprof_callgraph_frame_get_symbol (frame); if (sysprof_symbol_get_kind (symbol) != SYSPROF_SYMBOL_KIND_ROOT) - sysprof_callgraph_descendants_async (self->callgraph, - symbol, - NULL, - sysprof_callgraph_view_descendants_cb, - g_object_ref (self)); + { + sysprof_callgraph_view_set_utility_summary (self, NULL); + sysprof_callgraph_view_set_utility_traceables (self, NULL); + gtk_column_view_set_model (self->descendants_column_view, NULL); + + sysprof_callgraph_descendants_async (self->callgraph, + symbol, + NULL, + sysprof_callgraph_view_descendants_cb, + g_object_ref (self)); + } } }