mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Fix crop image crashes on Windows and maybe also fixed buggy behavior?
Cropping images seem to be working fine now, or at least I haven't encountered any bugs so far
This commit is contained in:
parent
353702ebc4
commit
0d5e9ce48a
|
@ -258,12 +258,12 @@ func centralize() -> void:
|
|||
|
||||
func crop_image() -> void:
|
||||
Global.canvas.selection.transform_content_confirm()
|
||||
# Use first cel as a starting rectangle
|
||||
var used_rect : Rect2 = Global.current_project.frames[0].cels[0].image.get_used_rect()
|
||||
|
||||
var used_rect := Rect2()
|
||||
for f in Global.current_project.frames:
|
||||
for cel in f.cels:
|
||||
cel.image.unlock()
|
||||
var cel_used_rect : Rect2 = cel.image.get_used_rect()
|
||||
cel.image.lock()
|
||||
if cel_used_rect == Rect2(0, 0, 0, 0): # If the cel has no content
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in a new issue