Show background layer after Flatten command

This commit is contained in:
David Capello 2015-07-27 08:20:15 -03:00
parent ea09ada11b
commit 02d0d7203a

View File

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