mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Show background layer after Flatten command
This commit is contained in:
parent
ea09ada11b
commit
02d0d7203a
@ -16,6 +16,7 @@
|
||||
#include "app/cmd/copy_rect.h"
|
||||
#include "app/cmd/remove_layer.h"
|
||||
#include "app/cmd/remove_layer.h"
|
||||
#include "app/cmd/set_layer_flags.h"
|
||||
#include "app/cmd/unlink_cel.h"
|
||||
#include "app/document.h"
|
||||
#include "doc/cel.h"
|
||||
@ -81,6 +82,14 @@ void FlattenLayers::onExecute()
|
||||
}
|
||||
}
|
||||
|
||||
// Show background if it's hidden
|
||||
if (!background->isVisible()) {
|
||||
LayerFlags newFlags = LayerFlags(
|
||||
int(background->flags()) | int(LayerFlags::Visible));
|
||||
|
||||
executeAndAdd(new cmd::SetLayerFlags(background, newFlags));
|
||||
}
|
||||
|
||||
// Delete old layers.
|
||||
LayerList layers = sprite->folder()->getLayersList();
|
||||
for (Layer* layer : layers)
|
||||
|
Loading…
Reference in New Issue
Block a user