From 7605fee09fe92ac9481ddcc490f464e44288b405 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Wed, 8 Apr 2020 20:13:47 +0100 Subject: [PATCH] Fix multiple openings of FG1000 windows Previously on the first call to display an FG1000 PFD/MFD from the Debug menu worked, because only one index was used, which was subsequently deleted when the window was closed. Now a new PFD/MFD instance is created each time the Debug menu is used. This isn't ideal, and probably exposes Nasal memory issues if used many times, but is fine for the moment. --- gui/menubar.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/menubar.xml b/gui/menubar.xml index fbb8152e1..ff3faa1ac 100644 --- a/gui/menubar.xml +++ b/gui/menubar.xml @@ -844,7 +844,7 @@ interfaceController.start(); var fg1000system = fg1000.FG1000.getOrCreateInstance(); - var pfdindex = fg1000system.addPFD(1); + var pfdindex = fg1000system.addPFD(); fg1000system.displayGUI(pfdindex); @@ -866,7 +866,7 @@ interfaceController.start(); var fg1000system = fg1000.FG1000.getOrCreateInstance(); - var mfdindex = fg1000system.addMFD(2); + var mfdindex = fg1000system.addMFD(); fg1000system.displayGUI(mfdindex);