From d82e162e9b534b7c615f05e4824765c2ad113d65 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Mon, 7 Oct 2024 11:48:49 +0200 Subject: [PATCH] Revert "CompositeBuilder::removeAllComponents should return a value, nor skip" This reverts commit 4d850736208ead4a203823bc937cb7fc7deea7fc. --- haxe/ui/containers/ScrollView.hx | 3 ++- haxe/ui/core/Component.hx | 5 ++++- haxe/ui/core/CompositeBuilder.hx | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/haxe/ui/containers/ScrollView.hx b/haxe/ui/containers/ScrollView.hx index 05eb150bb..210fe7441 100644 --- a/haxe/ui/containers/ScrollView.hx +++ b/haxe/ui/containers/ScrollView.hx @@ -1451,9 +1451,10 @@ class ScrollViewBuilder extends CompositeBuilder { return r; } - public override function removeAllComponents(dispose:Bool = true) { + public override function removeAllComponents(dispose:Bool = true):Bool { _contents.removeAllComponents(dispose); checkEmptyContentsComponent(); + return true; } public override function getComponentIndex(child:Component):Int { diff --git a/haxe/ui/core/Component.hx b/haxe/ui/core/Component.hx index 01ce55824..a96b7852f 100644 --- a/haxe/ui/core/Component.hx +++ b/haxe/ui/core/Component.hx @@ -740,7 +740,10 @@ class Component extends ComponentImpl @:dox(group = "Display tree related properties and methods") public function removeAllComponents(dispose:Bool = true) { if (_compositeBuilder != null) { - _compositeBuilder.removeAllComponents(dispose); + var b = _compositeBuilder.removeAllComponents(dispose); + if (b == true) { + return; + } } if (_children != null) { diff --git a/haxe/ui/core/CompositeBuilder.hx b/haxe/ui/core/CompositeBuilder.hx index bf69c5135..836145000 100644 --- a/haxe/ui/core/CompositeBuilder.hx +++ b/haxe/ui/core/CompositeBuilder.hx @@ -57,7 +57,8 @@ class CompositeBuilder { return null; } - public function removeAllComponents(dispose:Bool = true) { + public function removeAllComponents(dispose:Bool = true):Bool { + return false; } public function getComponentIndex(child:Component):Int {