mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-31 00:32:48 +00:00
Merge branch 'master'
This commit is contained in:
commit
58b9dfed11
@ -118,8 +118,10 @@ void NewFrameCommand::onExecute(Context* context)
|
||||
SelectedLayers selLayers;
|
||||
if (site->inFrames())
|
||||
selLayers.selectAllLayers(writer.sprite()->root());
|
||||
else
|
||||
else {
|
||||
selLayers = site->selectedLayers();
|
||||
selLayers.expandCollapsedGroups();
|
||||
}
|
||||
|
||||
frame_t frameRange =
|
||||
(site->selectedFrames().lastFrame() -
|
||||
|
@ -106,6 +106,15 @@ void SelectedLayers::selectAllLayers(LayerGroup* group)
|
||||
}
|
||||
}
|
||||
|
||||
void SelectedLayers::expandCollapsedGroups()
|
||||
{
|
||||
auto copy = m_set;
|
||||
for (Layer* layer : copy) {
|
||||
if (layer->isGroup() && layer->isCollapsed())
|
||||
selectAllLayers(static_cast<LayerGroup*>(layer));
|
||||
}
|
||||
}
|
||||
|
||||
void SelectedLayers::displace(layer_t layerDelta)
|
||||
{
|
||||
// Do nothing case
|
||||
|
@ -41,6 +41,7 @@ namespace doc {
|
||||
LayerList toLayerList() const;
|
||||
|
||||
void removeChildrenIfParentIsSelected();
|
||||
void expandCollapsedGroups();
|
||||
void selectAllLayers(LayerGroup* group);
|
||||
void displace(layer_t layerDelta);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user