Clarify warnings from fgUntie, and fix one source of such warnings, in FGInterface.
This commit is contained in:
parent
c3b9676e22
commit
fec7cb977c
2 changed files with 17 additions and 2 deletions
|
@ -410,6 +410,10 @@ FGInterface::bind ()
|
|||
void
|
||||
FGInterface::unbind ()
|
||||
{
|
||||
if (!bound) {
|
||||
return;
|
||||
}
|
||||
|
||||
bound = false;
|
||||
|
||||
fgUntie("/position/latitude-deg");
|
||||
|
|
|
@ -827,10 +827,21 @@ fgSetWritable (const char * name, bool state)
|
|||
}
|
||||
|
||||
void
|
||||
fgUntie (const char * name)
|
||||
fgUntie(const char * name)
|
||||
{
|
||||
if (!globals->get_props()->untie(name))
|
||||
SGPropertyNode* node = globals->get_props()->getNode(name);
|
||||
if (!node) {
|
||||
SG_LOG(SG_GENERAL, SG_WARN, "fgUntie: unknown property " << name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!node->isTied()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!node->untie()) {
|
||||
SG_LOG(SG_GENERAL, SG_WARN, "Failed to untie property " << name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue