mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
On delete, only create a blank image if there's a selection
If there is no selection, the entire image becomes transparent, so there is no need for a blank image to use with blit_rect_mask()
This commit is contained in:
parent
b9bab0aa5e
commit
2b3da1f591
|
@ -803,9 +803,9 @@ func delete(selected_cels := true) -> void:
|
|||
else:
|
||||
images = [project.frames[project.current_frame].cels[project.current_layer].image]
|
||||
|
||||
var blank := Image.new()
|
||||
blank.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
|
||||
if project.has_selection:
|
||||
var blank := Image.new()
|
||||
blank.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
|
||||
var selection_map_copy := SelectionMap.new()
|
||||
selection_map_copy.copy_from(project.selection_map)
|
||||
# In case the selection map is bigger than the canvas
|
||||
|
|
Loading…
Reference in a new issue