From 4f1d9be4235e82ce3f9ee4d3359630241c92725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 1 Sep 2021 17:26:10 +0200 Subject: [PATCH] Fix case with missing subtitle tracks In case when first video has a lot of subtitles, second video has only a few and third one more then second one, we forgot to make the recycled toggle buttons visible again, causing some tracks to be missing --- src/controls.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controls.js b/src/controls.js index abb58561..1a3476dd 100644 --- a/src/controls.js +++ b/src/controls.js @@ -162,8 +162,9 @@ class ClapperControls extends Gtk.Box while(child || i < array.length) { if(i >= array.length) { - child.hide(); debug(`hiding unused ${child.type} checkButton nr: ${i}`); + child.visible = false; + i++; child = child.get_next_sibling(); continue; @@ -194,6 +195,7 @@ class ClapperControls extends Gtk.Box debug(`checkButton type: ${checkButton.type}`); checkButton.activeId = el.activeId; debug(`checkButton id: ${checkButton.activeId}`); + checkButton.visible = true; if(checkButton.activeId === activeId) { checkButton.set_active(true);