Skip to content

Commit

Permalink
Revert "CompositeBuilder::removeAllComponents should return a value, …
Browse files Browse the repository at this point in the history
…nor skip"

This reverts commit 4d85073.
  • Loading branch information
ianharrigan committed Oct 7, 2024
1 parent 1cba7e5 commit d82e162
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion haxe/ui/containers/ScrollView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion haxe/ui/core/Component.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion haxe/ui/core/CompositeBuilder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d82e162

Please sign in to comment.