mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Don't set the selection_map of the project to the original_bitmap, if the latter is empty
Shouldn't happen, but best to check in case it does. Setting empty data to the selection_map breaks selections.
This commit is contained in:
parent
de5db85345
commit
964e9fbd26
|
@ -364,7 +364,10 @@ func _resize_rect(pos: Vector2, dir: Vector2) -> void:
|
|||
|
||||
func resize_selection() -> void:
|
||||
var size := big_bounding_rectangle.size.abs()
|
||||
Global.current_project.selection_map.copy_from(original_bitmap)
|
||||
if original_bitmap.is_empty():
|
||||
print("original_bitmap is empty, this shouldn't happen.")
|
||||
else:
|
||||
Global.current_project.selection_map.copy_from(original_bitmap)
|
||||
if is_moving_content:
|
||||
preview_image.copy_from(original_preview_image)
|
||||
preview_image.resize(size.x, size.y, Image.INTERPOLATE_NEAREST)
|
||||
|
|
Loading…
Reference in a new issue