mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Don't use the ColorBar bg color when Background is visible in Flatten
This commit is contained in:
parent
64ae80f0d3
commit
0f38a7dace
@ -45,15 +45,22 @@ void FlattenLayers::onExecute()
|
||||
|
||||
// If there aren't a background layer we must to create the background.
|
||||
LayerImage* background = sprite->backgroundLayer();
|
||||
bool created = false;
|
||||
if (!background) {
|
||||
background = new LayerImage(sprite);
|
||||
executeAndAdd(new cmd::AddLayer(sprite->folder(), background, nullptr));
|
||||
executeAndAdd(new cmd::ConfigureBackground(background));
|
||||
created = true;
|
||||
}
|
||||
|
||||
color_t bgcolor;
|
||||
if (created || !background->isVisible())
|
||||
bgcolor = doc->bgColor(background); // Use color bar background color
|
||||
else
|
||||
bgcolor = sprite->transparentColor();
|
||||
|
||||
render::Render render;
|
||||
render.setBgType(render::BgType::NONE);
|
||||
color_t bgcolor = doc->bgColor(background);
|
||||
|
||||
// Copy all frames to the background.
|
||||
for (frame_t frame(0); frame<sprite->totalFrames(); ++frame) {
|
||||
|
Loading…
Reference in New Issue
Block a user