libsysprof-gtk: connect zoom plumbing to session

This gets the plumbing in place, but all of the charts are not yet doing
the proper filtering based on session visible time.
This commit is contained in:
Christian Hergert
2023-06-30 15:38:55 -07:00
parent bd5ce9de06
commit a3a9ca1529
3 changed files with 32 additions and 0 deletions

View File

@ -364,3 +364,18 @@ sysprof_session_list_tracks (SysprofSession *self)
return g_object_ref (G_LIST_MODEL (self->tracks));
}
void
sysprof_session_zoom_to_selection (SysprofSession *self)
{
g_return_if_fail (SYSPROF_IS_SESSION (self));
if (memcmp (&self->visible_time, &self->selected_time, sizeof self->visible_time) == 0)
return;
self->visible_time = self->selected_time;
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_VISIBLE_TIME]);
sysprof_session_update_axis (self);
}