From 2a96d2d1c0a6c191697200c609a8b288d01364bd Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 3 Mar 2022 11:29:36 -0300 Subject: [PATCH] Fix some tests failing when calling BackgroundFromLayer and the user has some special app.bgColor values in the preferences --- scripts/color_convert.lua | 3 ++- scripts/inks.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/color_convert.lua b/scripts/color_convert.lua index 955d81500..3babcef41 100644 --- a/scripts/color_convert.lua +++ b/scripts/color_convert.lua @@ -1,4 +1,4 @@ --- Copyright (C) 2019-2021 Igara Studio S.A. +-- Copyright (C) 2019-2022 Igara Studio S.A. -- -- This file is released under the terms of the MIT license. -- Read LICENSE.txt for more information. @@ -27,6 +27,7 @@ do image:drawPixel(1, 0, pal:getColor(4)) image:drawPixel(1, 1, pal:getColor(5)) + app.bgColor = Color{ index=0 } app.command.BackgroundFromLayer() local layer = sprite.layers[1] diff --git a/scripts/inks.lua b/scripts/inks.lua index 21c9d5d74..91dbfd4f2 100644 --- a/scripts/inks.lua +++ b/scripts/inks.lua @@ -70,6 +70,7 @@ function test_inks(colorMode) end -- Convert to background layer + app.bgColor = Color{ index=0 } app.command.BackgroundFromLayer() app.useTool{ tool=pencil, color=d, points={ Point(0, 1), Point(2, 1) },