]> git.mxchange.org Git - flightgear.git/commitdiff
better use zero sensitive area to detect a missing (or inoperable) button,
authormfranz <mfranz>
Thu, 2 Feb 2006 00:00:27 +0000 (00:00 +0000)
committermfranz <mfranz>
Thu, 2 Feb 2006 00:00:27 +0000 (00:00 +0000)
because a missing <button> default to 0, which makes a lot of sense

src/Cockpit/panel_io.cxx

index fe4ae4f02347f07dc177ef18d88eb348de25e1e2..40963f3d0c67c5c2908464aec43543c6614f1877 100644 (file)
@@ -176,7 +176,7 @@ readAction (const SGPropertyNode * node, float w_scale, float h_scale)
   vector<SGPropertyNode_ptr>bindings = node->getChildren("binding");
 
   // button-less actions are fired initially, then fogotten
-  if (!node->hasValue("button")) {
+  if (!node->hasValue("w") || !node->hasValue("h")) {
     for (i = 0; i < bindings.size(); i++) {
       FGBinding b(bindings[i]);
       b.fire();