diff options
author | deva <deva> | 2010-08-18 10:01:23 +0000 |
---|---|---|
committer | deva <deva> | 2010-08-18 10:01:23 +0000 |
commit | bf621982a4ea570035615495e656d68d8e66f4e7 (patch) | |
tree | 3759adb7b9c6ff69afea719732a0659da70cecb7 /client/widgets/widget.cc | |
parent | 53716c209b72e3299c6eb5a8afc2f2ea6125158a (diff) |
Make setValid recursive.
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r-- | client/widgets/widget.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc index 2e0bd2b..88151ce 100644 --- a/client/widgets/widget.cc +++ b/client/widgets/widget.cc @@ -111,6 +111,8 @@ bool Widget::local() bool Widget::valid(bool deep) { + if(enabled() == false) return true; + if(preValid() == false) return false; if(is_valid == false) return false; @@ -129,6 +131,12 @@ void Widget::setValid(bool valid) { is_valid = valid; setWdgValid(valid); + + QVector< Widget* >::iterator i = children.begin(); + while(i != children.end()) { + if(*i) (*i)->setValid(valid); + i++; + } } void Widget::eventOnChange() |