Skip to content

Commit

Permalink
ensure destruction of hscroll / vscroll
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Oct 2, 2024
1 parent 79a46b5 commit b5c23a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions haxe/ui/containers/ScrollView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,14 @@ class ScrollViewBuilder extends CompositeBuilder {
_component.removeComponent(_contents);
_contents = null;
}
var vscroll:VerticalScroll = _component.findComponent(VerticalScroll, false);
if (vscroll != null) {
_component.removeComponent(vscroll);
}
var hscroll:HorizontalScroll = _component.findComponent(HorizontalScroll, false);
if (hscroll != null) {
_component.removeComponent(hscroll);
}
}

private function checkEmptyContentsComponent(contentsComponent:Component = null) {
Expand Down

0 comments on commit b5c23a9

Please sign in to comment.