mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +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,6 +364,9 @@ func _resize_rect(pos: Vector2, dir: Vector2) -> void:
|
||||||
|
|
||||||
func resize_selection() -> void:
|
func resize_selection() -> void:
|
||||||
var size := big_bounding_rectangle.size.abs()
|
var size := big_bounding_rectangle.size.abs()
|
||||||
|
if original_bitmap.is_empty():
|
||||||
|
print("original_bitmap is empty, this shouldn't happen.")
|
||||||
|
else:
|
||||||
Global.current_project.selection_map.copy_from(original_bitmap)
|
Global.current_project.selection_map.copy_from(original_bitmap)
|
||||||
if is_moving_content:
|
if is_moving_content:
|
||||||
preview_image.copy_from(original_preview_image)
|
preview_image.copy_from(original_preview_image)
|
||||||
|
|
Loading…
Reference in a new issue