From 8cc2a44268484ff981244a3deb1ed7d9863b9f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 27 Jun 2020 11:30:02 +0200 Subject: [PATCH] recorder: Don't select new row when adding recording This is what makes the recorder slow. We might want to scroll down in the list though. --- gtk/inspector/recorder.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 4db3ef650c..40a5e66c26 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c @@ -1257,24 +1257,8 @@ gtk_inspector_recorder_add_recording (GtkInspectorRecorder *recorder, GtkInspectorRecording *recording) { GtkInspectorRecorderPrivate *priv = gtk_inspector_recorder_get_instance_private (recorder); - guint count; - GtkListBoxRow *selected_row; - gboolean should_select_new_row; - - count = g_list_model_get_n_items (priv->recordings); - selected_row = gtk_list_box_get_selected_row (GTK_LIST_BOX (priv->recordings_list)); - if (count == 0 || selected_row == NULL) - should_select_new_row = TRUE; - else - should_select_new_row = (gtk_list_box_row_get_index (selected_row) == count - 1); g_list_store_append (G_LIST_STORE (priv->recordings), recording); - - if (should_select_new_row) - { - gtk_list_box_select_row (GTK_LIST_BOX (priv->recordings_list), - gtk_list_box_get_row_at_index (GTK_LIST_BOX (priv->recordings_list), count)); - } } void