Skip to content

Commit 4546a73

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tabs/osd.js

+6-2
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() {
@@ -4079,4 +4083,4 @@ TABS.osd.cleanup = function (callback) {
40794083
$('.jBox-wrapper').remove();
40804084

40814085
if (callback) callback();
4082-
};
4086+
};

0 commit comments

Comments
 (0)