summaryrefslogtreecommitdiff
path: root/client/widgets/widget.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-19 09:09:45 +0000
committerdeva <deva>2010-08-19 09:09:45 +0000
commit8e4159885b000b007ab820ffba3c39d257c1bdfb (patch)
treecc040b1c056ca69c84de92320d7ce9348cc97632 /client/widgets/widget.cc
parent7914500c96ebe2106716a001ca2b93594d3c07a5 (diff)
Fixed missing recursive setValid on setEnabled.
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r--client/widgets/widget.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index fba2da0..d4d0826 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -131,17 +131,19 @@ bool Widget::valid(bool deep)
return true;
}
-void Widget::setValid(bool valid)
+void Widget::setValid(bool valid, bool deep)
{
is_valid = valid;
setWdgValid(valid);
- /*
+
+ if(!deep) return;
+
QVector< Widget* >::iterator i = children.begin();
while(i != children.end()) {
- if(*i) (*i)->setValid(valid);
+ if(*i) (*i)->setValid(valid, deep);
i++;
}
- */
+
}
void Widget::runEventOnChange(bool deep)
@@ -162,7 +164,7 @@ void Widget::setEnabled(bool enabled)
{
widget->setEnabled(enabled);
if(enabled) emit eventOnChange();
- else setValid(true); // Force disabled widgets to be valid
+ else setValid(true, true); // Force disabled widgets to be valid
QVector< Widget* >::iterator i = children.begin();
while(i != children.end()) {