From d92fc946f1574370cd780697d0a7e218847418c8 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 21 Aug 2008 08:22:19 +0000 Subject: Fixed failing initial set on combobox --- client/widgets/combobox.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/widgets') diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc index 39a957b..aff5c7b 100644 --- a/client/widgets/combobox.cc +++ b/client/widgets/combobox.cc @@ -115,6 +115,9 @@ ComboBox::ComboBox(QDomNode &node, MacroWindow *macrowindow) //setEditText(elem.attribute("value")); break; } + + // Hack to force currentIndexChanged event. + setCurrentIndex(-1); } QString ComboBox::getValue() @@ -132,6 +135,7 @@ QString ComboBox::getValue() void ComboBox::setValue(QString value) { int idx = findData(value); + if(idx != -1) setCurrentIndex(idx); } -- cgit v1.2.3