diff --git a/CHANGES b/CHANGES index 7ff531d2f1a..0e0bc2e4dd3 100755 --- a/CHANGES +++ b/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). diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java index c72f65f50d8..a8d492ca164 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java @@ -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]; @@ -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 diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Tree.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Tree.java index fea0d988862..024aa2813bc 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Tree.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Tree.java @@ -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();