Expand groups when we change the active layer on timeline

This commit is contained in:
David Capello 2016-11-29 19:04:37 -03:00
parent 5b5764e40e
commit 9b9239ab05

View File

@ -306,6 +306,18 @@ void Timeline::setLayer(Layer* layer)
ASSERT(m_editor != NULL);
m_layer = layer;
// Expand all parents
if (m_layer) {
LayerGroup* group = m_layer->parent();
while (group != m_layer->sprite()->root()) {
// Expand this group
group->setCollapsed(false);
group = group->parent();
}
regenerateLayers();
}
invalidate();
if (m_editor->layer() != layer)