... | ... |
@@ -562,18 +562,17 @@ var displayClass = { |
562 | 562 |
|
563 | 563 |
updateNavigationBox : func { |
564 | 564 |
# update Navigation Box on MFD and PFD header {{{ |
565 |
- var enroute = getprop('/autopilot/route-manager/current-wp') > -1; |
|
566 | 565 |
var route = me.device.map.layers.route; |
567 | 566 |
data.fpSize = size(route.flightPlan); |
568 | 567 |
if (me.device.role == 'MFD') { |
569 | 568 |
for (var i=1; i<=4; i+=1) |
570 | 569 |
me.screenElements['DATA-FIELD' ~ i ~ '-VAL-text'] |
571 |
- .setVisible(enroute) |
|
572 | 570 |
.setText( |
573 |
- me.navbox[me.screenElements['DATA-FIELD' ~ i ~ '-ID-text'].setVisible(enroute).get('text')][0]() |
|
571 |
+ me.navbox[me.screenElements['DATA-FIELD' ~ i ~ '-ID-text'].get('text')][0]() |
|
574 | 572 |
); |
575 | 573 |
} |
576 | 574 |
else { # PFD |
575 |
+ var enroute = getprop('/autopilot/route-manager/current-wp') > -1; |
|
577 | 576 |
me.screenElements['ETE'].setVisible(enroute); |
578 | 577 |
me.screenElements['DIS'].setVisible(enroute); |
579 | 578 |
me.screenElements['ETE-text'].setVisible(enroute).setText(me.navbox.ETE[0]()); |