From afaae8ee4b1f7b504a80d3558720ab14c0395444 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sun, 4 Feb 2024 14:45:16 +0200 Subject: [PATCH] Simplify guard conditions in Bucket's draw_start() --- src/Tools/DesignTools/Bucket.gd | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Tools/DesignTools/Bucket.gd b/src/Tools/DesignTools/Bucket.gd index 6547b0553..3b7c38c59 100644 --- a/src/Tools/DesignTools/Bucket.gd +++ b/src/Tools/DesignTools/Bucket.gd @@ -155,12 +155,9 @@ func draw_start(pos: Vector2i) -> void: return Global.canvas.selection.transform_content_confirm() - if ( - !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn() - or !Rect2i(Vector2i.ZERO, Global.current_project.size).has_point(pos) - ): + if !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn(): 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 var undo_data := _get_undo_data() match _fill_area: