mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Simplify guard conditions in Bucket's draw_start()
This commit is contained in:
parent
5dfe1cc271
commit
afaae8ee4b
|
@ -155,12 +155,9 @@ func draw_start(pos: Vector2i) -> void:
|
||||||
return
|
return
|
||||||
|
|
||||||
Global.canvas.selection.transform_content_confirm()
|
Global.canvas.selection.transform_content_confirm()
|
||||||
if (
|
if !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn():
|
||||||
!Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn()
|
|
||||||
or !Rect2i(Vector2i.ZERO, Global.current_project.size).has_point(pos)
|
|
||||||
):
|
|
||||||
return
|
return
|
||||||
if Global.current_project.has_selection and not Global.current_project.can_pixel_get_drawn(pos):
|
if not Global.current_project.can_pixel_get_drawn(pos):
|
||||||
return
|
return
|
||||||
var undo_data := _get_undo_data()
|
var undo_data := _get_undo_data()
|
||||||
match _fill_area:
|
match _fill_area:
|
||||||
|
|
Loading…
Reference in a new issue