Melchior FRANZ:

Vivian pointed out that a redefined Ctrl-U key binding didn't work
correctly. I found out that this is, because the definition in
$FG_ROOT/keyboard.xml sets <value type="bool"> for binding[1],
and ... [better sit down first!] ... and assigning <value type="double">
in a *-set.xml file doesn't *really* set "double" as new type!

Instead, the boolean is kept, and a double sqeezed into it. In other
words: once tainted as bool, you can throw all doubles in the universe
on a property node, and all it will accept is 0 and 1. Without warning!

BTW: I changed the patch: I was overly cautious: clear_value() does already
care for ties and for setting NONE, so we just need to make that public as
clearValue(), and use that. Makes the patch a bit more verbose, though.  :-/
This commit is contained in:
ehofman
2005-05-09 14:31:41 +00:00
parent 4707b363aa
commit 64ab59c0e0
3 changed files with 30 additions and 28 deletions
+6 -6
View File
@@ -1172,6 +1172,12 @@ public:
void fireChildRemoved (SGPropertyNode * child);
/**
* Clear any existing value and set the type to NONE.
*/
void clearValue ();
protected:
void fireValueChanged (SGPropertyNode * node);
@@ -1203,12 +1209,6 @@ private:
bool set_string (const char * value);
/**
* Clear any existing value and set the type to NONE.
*/
void clear_value ();
/**
* Get the value as a string.
*/