Fix MapEditor world-wrap flickering (#8608)

Co-authored-by: tunerzinc@gmail.com <vfylfhby>
This commit is contained in:
vegeta1k95
2023-02-06 22:47:28 +01:00
committed by GitHub
parent d161a0a088
commit 77888be8d6
2 changed files with 6 additions and 1 deletions

View File

@ -134,6 +134,11 @@ class MapEditorScreen(map: TileMap? = null): BaseScreen(), RecreateOnResize {
tileClickHandler?.invoke(it)
}
if (tileMap.mapParameters.worldWrap) {
result.sizeChanged()
result.zoom(result.minZoom)
}
stage.root.addActorAt(0, result)
stage.scrollFocus = result

View File

@ -82,7 +82,7 @@ open class ZoomableScrollPane(
onViewportChanged()
}
override fun sizeChanged() {
public override fun sizeChanged() {
updatePadding()
super.sizeChanged()
updateCulling()