summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2010-08-18 12:04:12 +0000
committerdeva <deva>2010-08-18 12:04:12 +0000
commitabe143670b174e2604c97224df14732bf059f151 (patch)
tree40cf0f56a2861e5e0721038863dc7ed89106d745
parent195e25f7f46cf273bce2bb582f12b17fc2997c89 (diff)
Make setEnabled work recursively.
-rw-r--r--client/widgets/widget.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index 88151ce..9ebed55 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -150,6 +150,13 @@ void Widget::setEnabled(bool enabled)
widget->setEnabled(enabled);
if(enabled) eventOnChange();
else setValid(true); // Force disabled widgets to be valid
+
+ QVector< Widget* >::iterator i = children.begin();
+ while(i != children.end()) {
+ if(*i) (*i)->setEnabled(enabled);
+ i++;
+ }
+
}
bool Widget::enabled()