summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/gui/devicestate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/gui/devicestate.cpp')
-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();