1
0
Fork 0

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.
This commit is contained in:
Stuart Buchanan 2020-04-08 20:13:47 +01:00
parent 7a3a36eab2
commit 7605fee09f

View file

@ -844,7 +844,7 @@
interfaceController.start();
var fg1000system = fg1000.FG1000.getOrCreateInstance();
var pfdindex = fg1000system.addPFD(1);
var pfdindex = fg1000system.addPFD();
fg1000system.displayGUI(pfdindex);
</script>
@ -866,7 +866,7 @@
interfaceController.start();
var fg1000system = fg1000.FG1000.getOrCreateInstance();
var mfdindex = fg1000system.addMFD(2);
var mfdindex = fg1000system.addMFD();
fg1000system.displayGUI(mfdindex);
</script>