From bf621982a4ea570035615495e656d68d8e66f4e7 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 18 Aug 2010 10:01:23 +0000 Subject: Make setValid recursive. --- client/widgets/widget.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'client/widgets') 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() -- cgit v1.2.3