|
From: <fli...@li...> - 2021-01-20 12:07:25
|
jmturner pushed a commit to branch release/2020.3 in repository fgdata. SF URL: http://sourceforge.net/p/flightgear/fgdata/ci/a3cb5c68ae71f3b8443581406ac3713b0b6b51a4/ Commit: a3cb5c68ae71f3b8443581406ac3713b0b6b51a4 Author: James Turner Committer: James Turner AuthorDate: Fri Jan 8 19:35:00 2021 +0000 Tooltips: set a flag when registering the commands This allows the C++ side to avoid invoking the commands prematurely. --- Nasal/canvas/tooltip.nas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Nasal/canvas/tooltip.nas b/Nasal/canvas/tooltip.nas index dc3735481..b63de2ab4 100644 --- a/Nasal/canvas/tooltip.nas +++ b/Nasal/canvas/tooltip.nas @@ -422,3 +422,8 @@ addcommand("set-tooltip", setTooltip); addcommand("tooltip-timeout", showTooltip); addcommand("show-message", showMessage); addcommand("clear-message", clearMessage); + +# confirm the commands are registered: we use this to +# avoid sending commands before Nasal is inited, and hence +# producing errors +setprop("/sim/mouse/tooltip-commands-registered", 1); |