Fix #676 Window not redrawn on widget invalidation

This commit is contained in:
Grim 2023-10-24 14:52:41 +03:00
parent 7af5a9a233
commit 1b5f6d0508
1 changed files with 6 additions and 0 deletions

View File

@ -1413,6 +1413,7 @@ public:
/// request redraw /// request redraw
void invalidate() { void invalidate() {
_needDraw = true; _needDraw = true;
window.update();
} }
/// helper function for implement measure() when widget's content dimensions are known /// helper function for implement measure() when widget's content dimensions are known
@ -1811,6 +1812,11 @@ class WidgetGroup : Widget {
protected WidgetList _children; protected WidgetList _children;
override @property bool needDraw()
{
return _children.asArray.any!(x => x.needDraw) || _needDraw;
}
/// returns number of children of this widget /// returns number of children of this widget
@property override int childCount() const { return _children.count; } @property override int childCount() const { return _children.count; }
/// returns child by index /// returns child by index