diff options
Diffstat (limited to 'utils/themeeditor/gui/devicestate.cpp')
| -rw-r--r-- | utils/themeeditor/gui/devicestate.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp index 21f95bf..89985bf 100644 --- a/utils/themeeditor/gui/devicestate.cpp +++ b/utils/themeeditor/gui/devicestate.cpp @@ -474,10 +474,14 @@ void DeviceState::setData(QString tag, QVariant data) break; case Combo: - dynamic_cast<QComboBox*> - (found.second)-> - setCurrentIndex(dynamic_cast<QComboBox*> - (found.second)->findText(data.toString())); + if(data.type() == QVariant::String) + dynamic_cast<QComboBox*> + (found.second)-> + setCurrentIndex(dynamic_cast<QComboBox*> + (found.second)->findText(data.toString())); + else + dynamic_cast<QComboBox*>(found.second)-> + setCurrentIndex(data.toInt()); break; case Check: |