summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-29 20:39:45 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-29 20:39:45 +0000
commit9d6b5d63175168e427de1cad85c9d8ae4020b7c0 (patch)
tree374a815fc18ea40985437e255508639afdfbd41f /utils/themeeditor/gui
parent5565a28c7d9cf6217f5b85b3e078e74a3722175e (diff)
Theme Editor: Stopped conditionals and sublines from triggering newlines and made combo boxes in config panel return text if not used in a conditional
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27184 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui')
-rw-r--r--utils/themeeditor/gui/devicestate.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp
index f4907e1935..477adf2296 100644
--- a/utils/themeeditor/gui/devicestate.cpp
+++ b/utils/themeeditor/gui/devicestate.cpp
@@ -208,6 +208,9 @@ QVariant DeviceState::data(QString tag, int paramCount,
QPair<InputType, QWidget*> found =
inputs.value(tag, QPair<InputType, QWidget*>(Slide, 0));
+ if(found.second == 0 && tag[0] == '?')
+ found = inputs.value(tag.right(2), QPair<InputType, QWidget*>(Slide,0));
+
if(found.second == 0)
return QVariant();
@@ -226,7 +229,10 @@ QVariant DeviceState::data(QString tag, int paramCount,
return dynamic_cast<QDoubleSpinBox*>(found.second)->value();
case Combo:
- return dynamic_cast<QComboBox*>(found.second)->currentIndex();
+ if(tag[0] == '?')
+ return dynamic_cast<QComboBox*>(found.second)->currentIndex();
+ else
+ return dynamic_cast<QComboBox*>(found.second)->currentText();
case Check:
return dynamic_cast<QCheckBox*>(found.second)->isChecked();