mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-gtk: emit items-changed if session changes
That way we can generate new items with a proper session pointer.
This commit is contained in:
@ -250,5 +250,12 @@ sysprof_session_model_set_session (SysprofSessionModel *self,
|
|||||||
g_return_if_fail (!session || SYSPROF_IS_SESSION (session));
|
g_return_if_fail (!session || SYSPROF_IS_SESSION (session));
|
||||||
|
|
||||||
if (g_set_object (&self->session, session))
|
if (g_set_object (&self->session, session))
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SESSION]);
|
{
|
||||||
|
guint n_items = g_list_model_get_n_items (G_LIST_MODEL (self));
|
||||||
|
|
||||||
|
if (n_items > 0)
|
||||||
|
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items, n_items);
|
||||||
|
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SESSION]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user