From bae183633705b087f80afe11a36772f553a5cb26 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Mon, 12 Jul 2010 05:33:14 +0000 Subject: Theme Editor: Implemented some touch area click events git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27397 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/devicestate.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'utils/themeeditor/gui') diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp index 21f95bfa10..89985bf730 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 - (found.second)-> - setCurrentIndex(dynamic_cast - (found.second)->findText(data.toString())); + if(data.type() == QVariant::String) + dynamic_cast + (found.second)-> + setCurrentIndex(dynamic_cast + (found.second)->findText(data.toString())); + else + dynamic_cast(found.second)-> + setCurrentIndex(data.toInt()); break; case Check: -- cgit v1.2.3