From: Melchior F. <mf...@ba...> - 2008-07-30 21:52:43
|
Update of /var/cvs/FlightGear-0.9/data/gui/dialogs In directory baron.flightgear.org:/tmp/cvs-serv15458 Modified Files: view.xml Log Message: fix checkbox for aircraft specific views (for some mysterious reason this has suddenly stopped to work ... spooky!) Index: view.xml =================================================================== RCS file: /var/cvs/FlightGear-0.9/data/gui/dialogs/view.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C 2 -r1.4 -r1.5 *** view.xml 13 Dec 2007 13:57:23 -0000 1.4 --- view.xml 30 Jul 2008 21:54:01 -0000 1.5 *************** *** 24,27 **** --- 24,30 ---- continue; var index = v.getIndex(); + var enabled = v.getNode("enabled", 1); + props.initNode(enabled, 1, "BOOL"); + if (index >= 200) { if (mode != 2) { *************** *** 33,37 **** } elsif (index >= 100) { ! aircraft.data.add(v.getPath() ~ "/enabled"); if (mode != 1) { mode = 1; --- 36,40 ---- } elsif (index >= 100) { ! aircraft.data.add(enabled); if (mode != 1) { mode = 1; *************** *** 42,53 **** } - if (v.getNode("enabled") == nil) - v.getNode("enabled", 1).setBoolValue(1); - var target = group.getChild("checkbox", index, 1); props.copy(group.getNode("checkbox-template"), target); var name = v.getNode("name"); target.getNode("label").setValue(name != nil ? name.getValue() : ("** unnamed view " ~ index ~ " **")); ! target.getNode("property").setValue(v.getPath() ~ "/enabled"); } </open> --- 45,53 ---- } var target = group.getChild("checkbox", index, 1); props.copy(group.getNode("checkbox-template"), target); var name = v.getNode("name"); target.getNode("label").setValue(name != nil ? name.getValue() : ("** unnamed view " ~ index ~ " **")); ! target.getNode("property").setValue(enabled.getPath()); } </open> |