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

Restored LightenDarken's previous behavior

Fixes a minor issue from 6cce27a360
This commit is contained in:
Manolis Papadeas 2021-04-16 21:47:03 +03:00
parent 6ae0500ac7
commit 82e7e936fc
2 changed files with 4 additions and 4 deletions

View file

@ -129,8 +129,8 @@ func update_mirror_brush() -> void:
_mirror_brushes.xy.flip_y()
func update_mask() -> void:
if Global.pressure_sensitivity_mode == Global.PressureSensitivity.NONE:
func update_mask(can_skip := true) -> void:
if can_skip and Global.pressure_sensitivity_mode == Global.PressureSensitivity.NONE:
return
var size := _get_draw_image().get_size()
# Faster than zeroing PoolByteArray directly. See: https://github.com/Orama-Interactive/Pixelorama/pull/439
@ -347,7 +347,7 @@ func _set_pixel(position : Vector2) -> void:
var image := _get_draw_image()
var i := int(position.x + position.y * image.get_size().x)
if Global.pressure_sensitivity_mode != Global.PressureSensitivity.NONE:
if _mask.size() >= i + 1:
if _mask[i] < Tools.pen_pressure:
_mask[i] = Tools.pen_pressure
_drawer.set_pixel(image, position, tool_slot.color)

View file

@ -200,7 +200,7 @@ func update_strength() -> void:
func draw_start(position : Vector2) -> void:
update_mask()
update_mask(false)
_changed = false
_drawer.color_op.changed = false