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

Fixed issue in HSVDialog using the wrong selected pixels when affecting all projects

This commit is contained in:
OverloadedOrama 2020-07-24 03:53:24 +03:00
parent 2cb07fb848
commit 59122f6a13

View file

@ -61,10 +61,18 @@ func _on_Apply_pressed() -> void:
elif affect == ALL_PROJECTS:
for project in Global.projects:
var _pixels := []
if selection_checkbox.pressed:
_pixels = project.selected_pixels.duplicate()
else:
for x in project.size.x:
for y in project.size.y:
_pixels.append(Vector2(x, y))
Global.canvas.handle_undo("Draw", project, -1, -1)
for frame in project.frames:
for cel in frame.cels:
DrawingAlgos.adjust_hsv(cel.image, hue_slider.value, sat_slider.value, val_slider.value, pixels)
DrawingAlgos.adjust_hsv(cel.image, hue_slider.value, sat_slider.value, val_slider.value, _pixels)
Global.canvas.handle_redo("Draw", project, -1, -1)
reset()
visible = false