diff options
author | akashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-04-02 09:13:38 +0000 |
---|---|---|
committer | akashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-04-02 09:13:38 +0000 |
commit | 7a87f9569fc0c6fab7a678fa617467f5071a6de3 (patch) | |
tree | 453df64e5b32bcf58d398ea4cd386a7dd48cae4a | |
parent | d0c42185194480824b7c919048e815fa38a78408 (diff) | |
download | navit-svn-7a87f9569fc0c6fab7a678fa617467f5071a6de3.tar.gz |
Fix:gui/qml:Fixed parsing of integer true/false values
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@3113 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | gui/qml/skins/navit/ToggleButton.qml.in | 5 | ||||
-rw-r--r-- | gui/qml/skins/navit/ToggleSwitch.qml.in | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gui/qml/skins/navit/ToggleButton.qml.in b/gui/qml/skins/navit/ToggleButton.qml.in index 0edb0a22..ac86c276 100644 --- a/gui/qml/skins/navit/ToggleButton.qml.in +++ b/gui/qml/skins/navit/ToggleButton.qml.in @@ -21,12 +21,15 @@ import Qt 4.6 function startup () { if (togglebutton.stOn == "1" ) togglebutton.stOn = "true"; - else + else if (togglebutton.stOn == "0" ) togglebutton.stOn = "false"; + console.log("stOn now: "+togglebutton.stOn); + console.log("state now: "+togglebutton.state); if (togglebutton.stOn == "true") togglebutton.state = "on"; else togglebutton.state = "off"; + console.log("state now: "+togglebutton.state); } Component.onCompleted: startup(); diff --git a/gui/qml/skins/navit/ToggleSwitch.qml.in b/gui/qml/skins/navit/ToggleSwitch.qml.in index 35f90d16..fc87402b 100644 --- a/gui/qml/skins/navit/ToggleSwitch.qml.in +++ b/gui/qml/skins/navit/ToggleSwitch.qml.in @@ -17,7 +17,7 @@ import Qt 4.6 function startup () {
if (toggleswitch.stOn == "1" )
toggleswitch.stOn = "true";
- else
+ else if (toggleswitch.stOn == "0" )
toggleswitch.stOn = "false";
if (toggleswitch.stOn == "true")
toggleswitch.state = "on";
|