From 8bf85a6919e4d0ea93eb7bce8b394f4b5219ee59 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 17 Aug 2010 12:15:06 +0000 Subject: Fix value set in combobox. Make wiodgets with no valu run their onChange events on startup. --- client/widgets/combobox.cc | 4 ---- client/widgets/widget.cc | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'client/widgets') diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc index c426e41..ea8a239 100644 --- a/client/widgets/combobox.cc +++ b/client/widgets/combobox.cc @@ -141,10 +141,6 @@ ComboBox::ComboBox(QDomNode &node, MacroWindow *macrowindow) connect(combobox, SIGNAL(editTextChanged(QString)), this, SLOT(changed())); break; } - - ischangingbyuser = false; - changed(); - ischangingbyuser = true; } ComboBox::~ComboBox() diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc index 563f648..2e0bd2b 100644 --- a/client/widgets/widget.cc +++ b/client/widgets/widget.cc @@ -234,6 +234,7 @@ void Widget::addChildren(QDomNode &node, QLayout *layout) void Widget::setValues() { if(has_lazy) setValue(lazy_value, lazy_source); + else eventOnChange(); // Make sure we run validation on the unset widget. QVector< Widget* >::iterator i = children.begin(); while(i != children.end()) { -- cgit v1.2.3