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:
parent
7a3a36eab2
commit
7605fee09f
1 changed files with 2 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue