Skip to content

Commit c7dfe1a

Browse files
committed
speed up OSD tab loading if there are too many custom OSD elements.
1 parent ae0f6a8 commit c7dfe1a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tabs/osd.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3549,6 +3549,7 @@ function createCustomElements(){
35493549
}
35503550

35513551
var customElementsContainer = $('#osdCustomElements');
3552+
var init = true;
35523553

35533554
for(var i = 0; i < FC.OSD_CUSTOM_ELEMENTS.settings.customElementsCount; i++){
35543555
var label = $('<label>');
@@ -3606,7 +3607,9 @@ function createCustomElements(){
36063607
var valueBlock = $('.' + $(this).data('valueCellClass'))
36073608
valueBlock.find('.value').hide();
36083609
valueBlock.find('.' + dataValue).show();
3609-
updateOSDCustomElementsDisplay();
3610+
if(!init){
3611+
updateOSDCustomElementsDisplay();
3612+
}
36103613
});
36113614
}
36123615

@@ -3636,6 +3639,7 @@ function createCustomElements(){
36363639

36373640
fillCustomElementsValues();
36383641
customElementsInitCallback();
3642+
init = false;
36393643
}
36403644

36413645
function updateOSDCustomElementsDisplay() {

0 commit comments

Comments
 (0)