mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fix misleading indentation of PictureFlow::showSlide
This commit is contained in:
parent
fae244b4e3
commit
7b9502bd97
@ -1261,18 +1261,19 @@ void PictureFlow::showSlide(unsigned int index)
|
|||||||
{
|
{
|
||||||
index = qMax<unsigned int>(index, 0);
|
index = qMax<unsigned int>(index, 0);
|
||||||
index = qMin<unsigned int>(slideCount()-1, index);
|
index = qMin<unsigned int>(slideCount()-1, index);
|
||||||
if((int)index == d->state->centerSlide.slideIndex)
|
if((int)index == d->state->centerSlide.slideIndex) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int distance = centerIndex()-index;
|
int distance = centerIndex()-index;
|
||||||
|
|
||||||
if(abs(distance)>10)
|
if(abs(distance)>10)
|
||||||
{
|
{
|
||||||
if(distance<0)
|
if(distance<0)
|
||||||
setCenterIndex(centerIndex()+(-distance)-10);
|
setCenterIndex(centerIndex()+(-distance)-10);
|
||||||
else
|
else
|
||||||
setCenterIndex(centerIndex()-distance+10);
|
setCenterIndex(centerIndex()-distance+10);
|
||||||
}
|
}
|
||||||
|
|
||||||
d->state->centerIndex = index;
|
d->state->centerIndex = index;
|
||||||
d->animator->start(index);
|
d->animator->start(index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user