diff options
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r-- | gtk/src/subtitlehandler.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index b42b482b3..33e9e106a 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -1049,6 +1049,19 @@ ghb_clear_subtitle_list_settings(GhbValue *settings) ghb_array_reset(subtitle_list); } +void +ghb_clear_subtitle_selection(GtkBuilder *builder) +{ + GtkTreeView *tv; + GtkTreeSelection *tsel; + + tv = GTK_TREE_VIEW(GHB_WIDGET(builder, "subtitle_list_view")); + // Clear tree selection so that updates are not triggered + // that cause a recursive attempt to clear the tree selection (crasher) + tsel = gtk_tree_view_get_selection(tv); + gtk_tree_selection_unselect_all(tsel); +} + static void ghb_clear_subtitle_list_ui(GtkBuilder *builder) { |