mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Initial fix for racing condition in code for detecting first/last page of a comic that could lead to crashes.
This commit is contained in:
parent
6d3c7e4d83
commit
cd9adbb00a
@ -849,7 +849,7 @@ void Render::nextPage()
|
|||||||
update();
|
update();
|
||||||
emit pageChanged(currentIndex);
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
else
|
else if (hasLoadedComic() && (currentIndex == numPages()-1))
|
||||||
{
|
{
|
||||||
emit isLast();
|
emit isLast();
|
||||||
}
|
}
|
||||||
@ -873,7 +873,7 @@ void Render::nextDoublePage()
|
|||||||
update();
|
update();
|
||||||
emit pageChanged(currentIndex);
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
else
|
else if (hasLoadedComic() && (currentIndex >= numPages()-2))
|
||||||
{
|
{
|
||||||
emit isLast();
|
emit isLast();
|
||||||
}
|
}
|
||||||
@ -894,7 +894,7 @@ void Render::previousPage()
|
|||||||
update();
|
update();
|
||||||
emit pageChanged(currentIndex);
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
else
|
else if (hasLoadedComic() && (currentIndex == 0))
|
||||||
{
|
{
|
||||||
emit isCover();
|
emit isCover();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user