Bug Fix: #1732 Nasal runtime error with hovered tooltip
This commit is contained in:
parent
2f0b9ecd00
commit
43ac415a8a
1 changed files with 11 additions and 8 deletions
|
@ -120,7 +120,7 @@ var Tooltip = {
|
|||
_updateText: func
|
||||
{
|
||||
var msg = me._label;
|
||||
if (me._property != nil) {
|
||||
if (me._property != nil and me._label != nil) {
|
||||
var val = me._property.getValue() or 0;
|
||||
|
||||
# https://code.google.com/p/flightgear-bugs/issues/detail?id=1454
|
||||
|
@ -308,13 +308,7 @@ tooltip.createCanvas();
|
|||
|
||||
var innerSetTooltip = func(node)
|
||||
{
|
||||
tooltip.setLabel(cmdarg().getNode('label').getValue());
|
||||
var measure = cmdarg().getNode('measure-text');
|
||||
if (measure != nil) {
|
||||
tooltip.setWidthText(measure.getValue());
|
||||
} else {
|
||||
tooltip.setWidthText(nil);
|
||||
}
|
||||
tooltip.setLabel(nil);
|
||||
|
||||
var propPath = cmdarg().getNode('property');
|
||||
if (propPath != nil) {
|
||||
|
@ -324,6 +318,15 @@ var innerSetTooltip = func(node)
|
|||
tooltip.setProperty(nil);
|
||||
}
|
||||
|
||||
tooltip.setLabel(cmdarg().getNode('label').getValue());
|
||||
|
||||
var measure = cmdarg().getNode('measure-text');
|
||||
if (measure != nil) {
|
||||
tooltip.setWidthText(measure.getValue());
|
||||
} else {
|
||||
tooltip.setWidthText(nil);
|
||||
}
|
||||
|
||||
var mapping = cmdarg().getNode('mapping');
|
||||
if (mapping != nil) {
|
||||
var m = mapping.getValue();
|
||||
|
|
Loading…
Add table
Reference in a new issue