mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-30 23:19:49 +00:00
Fix resizing palette issue
Having one dimension less than 8 and one higher than 8 caused issues. This should now be fixed.
This commit is contained in:
parent
4e8acdf002
commit
950f075269
|
@ -54,7 +54,7 @@ func display_palette(palette: Palette) -> void:
|
|||
init_swatches()
|
||||
|
||||
if palette.width < MAX_GRID_SIZE.x or palette.height < MAX_GRID_SIZE.y:
|
||||
grid_size = Vector2(palette.width, palette.height)
|
||||
grid_size = Vector2(min(palette.width, MAX_GRID_SIZE.x), min(palette.height, MAX_GRID_SIZE.y))
|
||||
clear_swatches()
|
||||
init_swatches()
|
||||
elif palette.width >= MAX_GRID_SIZE.x and palette.height >= MAX_GRID_SIZE.y and grid_size != MAX_GRID_SIZE:
|
||||
|
|
Loading…
Reference in a new issue