diff --git a/src/Tools/BaseDraw.gd b/src/Tools/BaseDraw.gd index 6c8729bc2..bc12cb12b 100644 --- a/src/Tools/BaseDraw.gd +++ b/src/Tools/BaseDraw.gd @@ -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 diff --git a/src/Tools/UtilityTools/ColorPicker.gd b/src/Tools/UtilityTools/ColorPicker.gd index 6ecf32caa..f77cf2e05 100644 --- a/src/Tools/UtilityTools/ColorPicker.gd +++ b/src/Tools/UtilityTools/ColorPicker.gd @@ -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)