mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
Flattening one image layer will flatten all layers anyway
(the same is not true for groups)
This commit is contained in:
parent
a138f2bce6
commit
38f3c668b6
@ -74,7 +74,11 @@ void FlattenLayersCommand::onExecute(Context* context)
|
||||
range = App::instance()->timeline()->range();
|
||||
#endif
|
||||
|
||||
if (!range.enabled()) {
|
||||
// If the range is not selected or we have only one image layer
|
||||
// selected, we'll flatten all layers.
|
||||
if (!range.enabled() ||
|
||||
(range.selectedLayers().size() == 1 &&
|
||||
(*range.selectedLayers().begin())->isImage())) {
|
||||
for (auto layer : sprite->root()->layers())
|
||||
range.selectLayer(layer);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user