File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1535,7 +1535,18 @@ TABS.osd.initialize = function (callback) {
15351535 //Switch all elements
15361536 $ ( 'input#switch-all' ) . change ( function ( ) {
15371537 var new_state = $ ( this ) . is ( ':checked' ) ;
1538- $ ( '#element-fields input[type=checkbox]' ) . prop ( 'checked' , new_state ) . change ( ) ;
1538+
1539+ var updateList = [ ] ;
1540+ $ ( '#element-fields input[type=checkbox]' ) . each ( function ( ) {
1541+ var field = $ ( this ) . data ( 'field' ) ;
1542+ field . isVisible = new_state ;
1543+
1544+ updateList . push ( MSP . promise ( MSPCodes . MSP_SET_OSD_CONFIG , OSD . msp . encodeLayout ( field ) ) ) ;
1545+ } )
1546+
1547+ Promise . all ( updateList ) . then ( function ( ) {
1548+ updateOsdView ( ) ;
1549+ } ) ;
15391550 } )
15401551
15411552 $ ( document ) . on ( 'click' , 'span.progressLabel a.save_font' , function ( ) {
You can’t perform that action at this time.
0 commit comments