diff --git a/core/src/mindustry/client/ui/SchematicBrowserDialog.java b/core/src/mindustry/client/ui/SchematicBrowserDialog.java index 9af0c87e69..414b7e9dd4 100644 --- a/core/src/mindustry/client/ui/SchematicBrowserDialog.java +++ b/core/src/mindustry/client/ui/SchematicBrowserDialog.java @@ -201,10 +201,9 @@ public void setCullingArea(Rect cullingArea) { var pane = cont.pane(t[0]).grow().scrollX(false).get(); if(Core.settings.getBool("schematicuicarryover") && this.pane != null){ float scroll = this.pane.getVisualScrollY(); - Core.app.post(() -> { - pane.setScrollYForce(scroll); - pane.updateVisualScroll(); - }); + pane.invalidate(); + pane.setScrollYForce(scroll); + pane.updateVisualScroll(); } this.pane = pane; } diff --git a/core/src/mindustry/ui/dialogs/SchematicsDialog.java b/core/src/mindustry/ui/dialogs/SchematicsDialog.java index 507ad444cd..5331c16002 100644 --- a/core/src/mindustry/ui/dialogs/SchematicsDialog.java +++ b/core/src/mindustry/ui/dialogs/SchematicsDialog.java @@ -278,10 +278,9 @@ public Element hit(float x, float y, boolean touchable){ }).grow().scrollX(false).get(); if(Core.settings.getBool("schematicuicarryover") && this.pane != null){ float scroll = this.pane.getVisualScrollY(); - Core.app.post(() -> { - pane.setScrollYForce(scroll); - pane.updateVisualScroll(); - }); + pane.invalidate(); + pane.setScrollYForce(scroll); + pane.updateVisualScroll(); } this.pane = pane; }