Skip to content

Commit

Permalink
Fix #676 Window not redrawn on widget invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimMaple committed Oct 24, 2023
1 parent 7af5a9a commit 1b5f6d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dlangui/widgets/widget.d
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1b5f6d0

Please sign in to comment.