mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Cover Browser: Fix visual "pop" when scrolling the first time
This commit is contained in:
parent
eaae5b235e
commit
1eb1a32254
@ -496,9 +496,9 @@ void PictureFlowPrivate::setCurrentSlide(int index)
|
|||||||
{
|
{
|
||||||
animateTimer.stop();
|
animateTimer.stop();
|
||||||
step = 0;
|
step = 0;
|
||||||
centerIndex = qBound(index, 0, slideImages->count()-1);
|
centerIndex = qBound(0, index, qMax(0, slideImages->count()-1));
|
||||||
target = centerIndex;
|
target = centerIndex;
|
||||||
slideFrame = ((long long)index) << 16;
|
slideFrame = ((long long)centerIndex) << 16;
|
||||||
resetSlides();
|
resetSlides();
|
||||||
triggerRender();
|
triggerRender();
|
||||||
widget->emitcurrentChanged(centerIndex);
|
widget->emitcurrentChanged(centerIndex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user