mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Use timeline selection only when it's visible
This commit is contained in:
parent
a122f1ceba
commit
169cfa39cf
@ -328,9 +328,14 @@ void UIContext::onGetActiveSite(Site* site) const
|
||||
view->getSite(site);
|
||||
|
||||
if (site->sprite()) {
|
||||
// Selected range in the timeline
|
||||
// Selected range in the timeline. We use it only if the
|
||||
// timeline is visible. A common scenario might be
|
||||
// undoing/redoing actions where the range is re-selected, that
|
||||
// could enable the range even if the timeline is hidden. In
|
||||
// this way we avoid using the timeline selection unexpectedly.
|
||||
Timeline* timeline = App::instance()->timeline();
|
||||
if (timeline &&
|
||||
timeline->isVisible() &&
|
||||
timeline->range().enabled()) {
|
||||
site->range(timeline->range());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user