mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 14:59:50 +00:00
Set same scroll position in timeline after updating scrollable area
This fixes the following problem:
* Hide the Timeline, and restart the program
* Open a sprite with a lot of layers
* Show the Timeline
Without this fix, depending on the selected layer the scroll will be
invalid and the layer will not be displayed by default when the
Timeline appears.
Related to 229ded9642
This commit is contained in:
parent
f9d41665f0
commit
0f04e016b6
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -304,7 +304,6 @@ void Timeline::setZoomAndUpdate(const double zoom,
|
||||
setZoom(zoom);
|
||||
regenerateTagBands();
|
||||
updateScrollBars();
|
||||
setViewScroll(viewScroll());
|
||||
invalidate();
|
||||
}
|
||||
if (updatePref && zoom != docPref().thumbnails.zoom()) {
|
||||
@ -3192,6 +3191,8 @@ void Timeline::updateScrollBars()
|
||||
m_viewportArea, *this,
|
||||
m_hbar,
|
||||
m_vbar);
|
||||
|
||||
setViewScroll(viewScroll());
|
||||
}
|
||||
|
||||
void Timeline::updateByMousePos(ui::Message* msg, const gfx::Point& mousePos)
|
||||
|
Loading…
Reference in New Issue
Block a user