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
This commit is contained in:
Rafał Dzięgiel
2021-09-01 17:26:10 +02:00
parent 82557df7c4
commit 4f1d9be423

4
src/controls.js vendored
View File

@@ -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);