mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix color picker selecting fully transparent pixels that are not black
This commit is contained in:
parent
d9888036f2
commit
963819a71a
|
@ -730,7 +730,7 @@ func _pick_color(pos: Vector2i) -> void:
|
|||
if project.layers[idx].is_visible_in_hierarchy():
|
||||
image = curr_frame.cels[idx].get_image()
|
||||
color = image.get_pixelv(pos)
|
||||
if color != Color(0, 0, 0, 0):
|
||||
if not is_zero_approx(color.a):
|
||||
break
|
||||
var button := (
|
||||
MOUSE_BUTTON_LEFT
|
||||
|
|
|
@ -26,7 +26,7 @@ func _on_Options_item_selected(id: int) -> void:
|
|||
save_config()
|
||||
|
||||
|
||||
func _on_ExtractFrom_item_selected(index):
|
||||
func _on_ExtractFrom_item_selected(index: int) -> void:
|
||||
_mode = index
|
||||
update_config()
|
||||
save_config()
|
||||
|
@ -80,7 +80,7 @@ func _pick_color(pos: Vector2i) -> void:
|
|||
if project.layers[idx].is_visible_in_hierarchy():
|
||||
image = curr_frame.cels[idx].get_image()
|
||||
color = image.get_pixelv(pos)
|
||||
if not color.is_equal_approx(Color(0, 0, 0, 0)):
|
||||
if not is_zero_approx(color.a):
|
||||
break
|
||||
CURRENT_LAYER:
|
||||
color = image.get_pixelv(pos)
|
||||
|
|
Loading…
Reference in a new issue