mirror of https://github.com/buggins/dlangui.git
Fix #676 Window not redrawn on widget invalidation
This commit is contained in:
parent
7af5a9a233
commit
1b5f6d0508
|
|
@ -1413,6 +1413,7 @@ public:
|
|||
/// request redraw
|
||||
void invalidate() {
|
||||
_needDraw = true;
|
||||
window.update();
|
||||
}
|
||||
|
||||
/// helper function for implement measure() when widget's content dimensions are known
|
||||
|
|
@ -1811,6 +1812,11 @@ class WidgetGroup : Widget {
|
|||
|
||||
protected WidgetList _children;
|
||||
|
||||
override @property bool needDraw()
|
||||
{
|
||||
return _children.asArray.any!(x => x.needDraw) || _needDraw;
|
||||
}
|
||||
|
||||
/// returns number of children of this widget
|
||||
@property override int childCount() const { return _children.count; }
|
||||
/// returns child by index
|
||||
|
|
|
|||
Loading…
Reference in New Issue