Skip to content

Commit

Permalink
Code that overrides Group#clear()/clearChildren() probably should cha…
Browse files Browse the repository at this point in the history
…nge to override the (boolean) method.

#6423
  • Loading branch information
NathanSweet committed Feb 21, 2021
1 parent 496dd4e commit 55782ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGES
@@ -1,7 +1,7 @@
[1.9.15]
- [BREAKING CHANGE] Requires Java 7 or above.
- [BREAKING CHANGE] API Change: Scaling is now an object instead of an enum. This may change behavior when used with serialization.
- [BREAKING CHANGE] Group#clear and #clearChildren() now unfocuses the actors. Added #clear(boolean) and #clearChildren(boolean) for when this isn't wanted. #6423
- [BREAKING CHANGE] Group#clear() and #clearChildren() now unfocus the children. Added clear(boolean) and clearChildren(boolean) for when this isn't wanted. Code that overrides clear()/clearChildren() probably should change to override the (boolean) method. #6423
- [BREAKING CHANGE] Lwjgl3WindowConfiguration#autoIconify is enabled by default.
- Scene2d.ui: Added new ParticleEffectActor to use particle effects on Stage
- API addition: iOS: Added HdpiMode option to IOSApplicationConfiguration to allow users to set whether they want to work in logical or raw pixels (default logical).
Expand Down
4 changes: 2 additions & 2 deletions gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java
Expand Up @@ -329,7 +329,7 @@ public Actor removeActorAt (int index, boolean unfocus) {
}

/** Removes all actors and cells from the table. */
public void clearChildren () {
public void clearChildren (boolean unfocus) {
Object[] cells = this.cells.items;
for (int i = this.cells.size - 1; i >= 0; i--) {
Cell cell = (Cell)cells[i];
Expand All @@ -344,7 +344,7 @@ public void clearChildren () {
rowDefaults = null;
implicitEndRow = false;

super.clearChildren();
super.clearChildren(unfocus);
}

/** Removes all actors and cells from the table (same as {@link #clearChildren()}) and additionally resets all table properties
Expand Down
4 changes: 2 additions & 2 deletions gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Tree.java
Expand Up @@ -188,8 +188,8 @@ public void remove (N node) {
}

/** Removes all tree nodes. */
public void clearChildren () {
super.clearChildren();
public void clearChildren (boolean unfocus) {
super.clearChildren(unfocus);
setOverNode(null);
rootNodes.clear();
selection.clear();
Expand Down

0 comments on commit 55782ff

Please sign in to comment.