Fix some tests failing when calling BackgroundFromLayer and the user has some special app.bgColor values in the preferences

This commit is contained in:
David Capello 2022-03-03 11:29:36 -03:00
parent 64045a6710
commit 2a96d2d1c0
2 changed files with 3 additions and 1 deletions

View File

@ -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]

View File

@ -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) },