From 59122f6a13a7f113b9bc99b81da83e2bab6beb3d Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 24 Jul 2020 03:53:24 +0300 Subject: [PATCH] Fixed issue in HSVDialog using the wrong selected pixels when affecting all projects --- src/UI/Dialogs/HSVDialog.gd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/UI/Dialogs/HSVDialog.gd b/src/UI/Dialogs/HSVDialog.gd index e1ddd44cb..3a2c132c5 100644 --- a/src/UI/Dialogs/HSVDialog.gd +++ b/src/UI/Dialogs/HSVDialog.gd @@ -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