1
0
Fork 0
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 - Fix #999

This commit is contained in:
Emmanouil Papadeas 2024-03-26 02:14:30 +02:00
parent 3b8c63c4a6
commit fb958065f5
3 changed files with 3 additions and 2 deletions

View file

@ -32,6 +32,7 @@ Built using Godot 3.5.2
- Pxo files can now be loaded from the Open menu option in the Web version. [3dcc51705a999145e53a8e6d4de217dc03b0f147](https://github.com/Orama-Interactive/Pixelorama/commit/3dcc51705a999145e53a8e6d4de217dc03b0f147)
- Fixed crash due to division by zero when locking two or three ValueSliders, and one of them has the value of 0 and the user attempts to change it.
- Fixed exporting selected layers not including the non-selected frames.
- Made the color picker not select fully transparent pixels that are not black. [#999](https://github.com/Orama-Interactive/Pixelorama/issues/999)
- The ellipse tool no longer produces gaps with large sizes. [4f3a7a305a264e0d2fe86c201af76eca4b2fea0a](https://github.com/Orama-Interactive/Pixelorama/commit/4f3a7a305a264e0d2fe86c201af76eca4b2fea0a)
- Fix "visible layers" option on the export dialog producing wrong results. [346d1f071a8c6b1defb1072d39aea9c642f1ef59](https://github.com/Orama-Interactive/Pixelorama/commit/346d1f071a8c6b1defb1072d39aea9c642f1ef59)
- Random brushes now work again. [1317e40ffa5e9f01a9d214221bb5133db20a1de9](https://github.com/Orama-Interactive/Pixelorama/commit/1317e40ffa5e9f01a9d214221bb5133db20a1de9)

View file

@ -82,7 +82,7 @@ func _pick_color(position: Vector2) -> void:
image.lock()
color = image.get_pixelv(position)
image.unlock()
if color != Color(0, 0, 0, 0):
if not is_zero_approx(color.a):
break
CURRENT_LAYER:
image.lock()

View file

@ -701,7 +701,7 @@ func _pick_color(position: Vector2) -> void:
image.lock()
color = image.get_pixelv(position)
image.unlock()
if color != Color(0, 0, 0, 0):
if not is_zero_approx(color.a):
break
var button := BUTTON_LEFT if Tools._slots[BUTTON_LEFT].tool_node == self else BUTTON_RIGHT
Tools.assign_color(color, button, false)