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

Fix Delete button and fill selection mode of the bucket tool not working with indexed mode

This commit is contained in:
Emmanouil Papadeas 2024-11-23 00:58:34 +02:00
parent b87a8e2ab8
commit 0484b1012f
2 changed files with 4 additions and 0 deletions

View file

@ -269,9 +269,11 @@ func fill_in_selection() -> void:
var selection_map_copy := project.selection_map.return_cropped_copy(project.size) var selection_map_copy := project.selection_map.return_cropped_copy(project.size)
for image in images: for image in images:
image.blit_rect_mask(filler, selection_map_copy, rect, rect.position) image.blit_rect_mask(filler, selection_map_copy, rect, rect.position)
image.convert_rgb_to_indexed()
else: else:
for image in images: for image in images:
image.fill(tool_slot.color) image.fill(tool_slot.color)
image.convert_rgb_to_indexed()
else: else:
# End early if we are filling with an empty pattern # End early if we are filling with an empty pattern
var pattern_image: Image = _pattern.image var pattern_image: Image = _pattern.image

View file

@ -808,9 +808,11 @@ func delete(selected_cels := true) -> void:
image.blit_rect_mask( image.blit_rect_mask(
blank, selection_map_copy, big_bounding_rectangle, big_bounding_rectangle.position blank, selection_map_copy, big_bounding_rectangle, big_bounding_rectangle.position
) )
image.convert_rgb_to_indexed()
else: else:
for image in images: for image in images:
image.fill(0) image.fill(0)
image.convert_rgb_to_indexed()
commit_undo("Draw", undo_data_tmp) commit_undo("Draw", undo_data_tmp)