From 79b18fc242ab312f328955c9227d1a42ab23263e Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 13 Apr 2024 14:31:48 +0300 Subject: [PATCH] Fix brushes being able to get drawn outside of the selection, if the selection is outside the canvas --- src/Tools/BaseDraw.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/BaseDraw.gd b/src/Tools/BaseDraw.gd index bc12cb12b..80fcee12e 100644 --- a/src/Tools/BaseDraw.gd +++ b/src/Tools/BaseDraw.gd @@ -467,7 +467,7 @@ func remove_unselected_parts_of_brush(brush: Image, dst: Vector2i) -> Image: for x in brush_size.x: for y in brush_size.y: var pos := Vector2i(x, y) + dst - if !project.selection_map.is_pixel_selected(pos): + if !project.can_pixel_get_drawn(pos): new_brush.set_pixel(x, y, Color(0)) return new_brush