1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Remove unnecessary variable from change_layer_automaticaly()

This commit is contained in:
Emmanouil Papadeas 2024-08-16 13:57:51 +03:00
parent 743a80e154
commit c1fb706a33

View file

@ -652,13 +652,12 @@ func change_layer_automatically(pos: Vector2i) -> void:
if pos.x > image.get_width() - 1 or pos.y > image.get_height() - 1:
return
var color := Color(0, 0, 0, 0)
var curr_frame := project.frames[project.current_frame]
for layer in project.layers.size():
var layer_index := (project.layers.size() - 1) - layer
if project.layers[layer_index].is_visible_in_hierarchy():
image = curr_frame.cels[layer_index].get_image()
color = image.get_pixelv(pos)
var color := image.get_pixelv(pos)
if not is_zero_approx(color.a):
# Change layer.
project.selected_cels.clear()