20,741
edits
Line 140: | Line 140: | ||
{{Note|The following patch contains changes that move the definition of aircraft specific switches back into the navdisplay.styles file, adding GUI related fields to the hash, so that these can be used to procedurally create a UI without requiring an actual cockpit (including an optional values vector). In addition, this makes deletion of the Canvas by the ND optional, so that PUI based CanvasWidgets can reuse the ND without having to reallocate a new Canvas. Also, changes references to properly resolve to canvas.Path. | {{Note|The following patch contains changes that move the definition of aircraft specific switches back into the navdisplay.styles file, adding GUI related fields to the hash, so that these can be used to procedurally create a UI without requiring an actual cockpit (including an optional values vector). In addition, this makes deletion of the Canvas by the ND optional, so that PUI based CanvasWidgets can reuse the ND without having to reallocate a new Canvas. Also, changes references to properly resolve to canvas.Path. | ||
}} | }} | ||
<syntaxhighlight lang="diff"> | <syntaxhighlight lang="diff">diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd | ||
index 89996f4..43080cb 100644 | |||
diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd | |||
index 89996f4.. | |||
--- a/Nasal/canvas/map/navdisplay.mfd | --- a/Nasal/canvas/map/navdisplay.mfd | ||
+++ b/Nasal/canvas/map/navdisplay.mfd | +++ b/Nasal/canvas/map/navdisplay.mfd | ||
Line 202: | Line 189: | ||
foreach(var t; me.timers) | foreach(var t; me.timers) | ||
t.stop(); | t.stop(); | ||
- foreach(var l; me.listeners) | |||
- removelistener(l); | - removelistener(l); | ||
+ foreach(var l; me.listeners) | |||
+ # removelistener(l); | + # removelistener(l); | ||
+ call(removelistener, [l]); | + call(removelistener, [l]); |