diff options
author | deva <deva> | 2010-08-17 12:15:06 +0000 |
---|---|---|
committer | deva <deva> | 2010-08-17 12:15:06 +0000 |
commit | 8bf85a6919e4d0ea93eb7bce8b394f4b5219ee59 (patch) | |
tree | 5ccf710fe3598b1b99d49ee8e46633b0f5eb1300 /client | |
parent | 8c1074e85939118ede18797bd1ce249bb6cee30d (diff) |
Fix value set in combobox. Make wiodgets with no valu run their onChange events on startup.
Diffstat (limited to 'client')
-rw-r--r-- | client/macrowindow.cc | 5 | ||||
-rw-r--r-- | client/widgets/combobox.cc | 4 | ||||
-rw-r--r-- | client/widgets/widget.cc | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 49f3782..6e7249e 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -118,7 +118,12 @@ void MacroWindow::initMacro(QDomNode &node) clear(); } + DEBUG(mainwindow, "----------------------Before--------------------------"); + Window *window = new Window(elem, this); + + DEBUG(mainwindow, "----------------------After--------------------------"); + connect(window, SIGNAL(wasChanged()), this, SLOT(macroChanged())); macrotitle = elem.attribute("caption"); 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()) { |