From 15488a00eae8d10249015b88e4b7bdc47365b854 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 15 Jul 2010 06:24:11 +0000 Subject: Theme Editor: Committed FS#11477 to add a DECIMAL parameter type in the parser and adapt the Theme Editor to accomodate the change by Johnathan Gordon. Fixed bug in the parser caused by the patch (error was thrown on zero value) and adapted tag rendering for new format git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27426 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/devicestate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/themeeditor/gui/devicestate.cpp') diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp index 89985bf730..e766a64835 100644 --- a/utils/themeeditor/gui/devicestate.cpp +++ b/utils/themeeditor/gui/devicestate.cpp @@ -225,7 +225,7 @@ QVariant DeviceState::data(QString tag, int paramCount, QString path = tag[0].isLower() ? data("file").toString() : data("nextfile").toString(); if(paramCount > 0) - return directory(path, params[0].data.numeric); + return directory(path, params[0].data.number); else return QVariant(); } @@ -255,7 +255,7 @@ QVariant DeviceState::data(QString tag, int paramCount, else if(tag == "pS") { double threshhold = paramCount > 0 - ? std::atof(params[0].data.text) : 10; + ? params[0].data.number / 10. : 10; if(data("?pc").toDouble() <= threshhold) return true; else @@ -264,7 +264,7 @@ QVariant DeviceState::data(QString tag, int paramCount, else if(tag == "pE") { double threshhold = paramCount > 0 - ? std::atof(params[0].data.text) : 10; + ? params[0].data.number / 10. : 10; if(data("?pt").toDouble() - data("?pc").toDouble() <= threshhold) return true; else -- cgit v1.2.3