diff --git a/Nasal/canvas/MFD_Generic.nas b/Nasal/canvas/MFD_Generic.nas index 98791620d..218b3e374 100644 --- a/Nasal/canvas/MFD_Generic.nas +++ b/Nasal/canvas/MFD_Generic.nas @@ -432,6 +432,14 @@ var PFD_NavDisplay = { if (!me.nd_initialised) me.nd_init(); + #2018.2 - manage the timer so that the nav display is only updated when visibile + me.NDCpt.onDisplay(); + }; + obj.offdisplay = func + { + #2018.2 - manage the timer so that the nav display is only updated when visibile + if (me.nd_initialised) + me.NDCpt.offDisplay(); }; # # most updates performed by the canvas nav display directly. diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd index 89996f4c0..fc1066e6e 100644 --- a/Nasal/canvas/map/navdisplay.mfd +++ b/Nasal/canvas/map/navdisplay.mfd @@ -175,7 +175,8 @@ var NavDisplay = { }, # of connectAI setTimerInterval: func(update_time=0.05) me.update_timer.restart(update_time), - + onDisplay: func {me.setTimerInterval();}, + offDisplay: func {me.update_timer.stop();}, # TODO: the ctor should allow customization, for different aircraft # especially properties and SVG files/handles (747, 757, 777 etc) new : func(prop1, switches=default_switches, style='Boeing') {