From 0484b1012f5751ec9a986f4c01987c99e4267686 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 23 Nov 2024 00:58:34 +0200 Subject: [PATCH] Fix Delete button and fill selection mode of the bucket tool not working with indexed mode --- src/Tools/DesignTools/Bucket.gd | 2 ++ src/UI/Canvas/Selection.gd | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Tools/DesignTools/Bucket.gd b/src/Tools/DesignTools/Bucket.gd index 5a96594bd..801b4e634 100644 --- a/src/Tools/DesignTools/Bucket.gd +++ b/src/Tools/DesignTools/Bucket.gd @@ -269,9 +269,11 @@ func fill_in_selection() -> void: var selection_map_copy := project.selection_map.return_cropped_copy(project.size) for image in images: image.blit_rect_mask(filler, selection_map_copy, rect, rect.position) + image.convert_rgb_to_indexed() else: for image in images: image.fill(tool_slot.color) + image.convert_rgb_to_indexed() else: # End early if we are filling with an empty pattern var pattern_image: Image = _pattern.image diff --git a/src/UI/Canvas/Selection.gd b/src/UI/Canvas/Selection.gd index 2149ad90c..1301d1e4e 100644 --- a/src/UI/Canvas/Selection.gd +++ b/src/UI/Canvas/Selection.gd @@ -808,9 +808,11 @@ func delete(selected_cels := true) -> void: image.blit_rect_mask( blank, selection_map_copy, big_bounding_rectangle, big_bounding_rectangle.position ) + image.convert_rgb_to_indexed() else: for image in images: image.fill(0) + image.convert_rgb_to_indexed() commit_undo("Draw", undo_data_tmp)