mirror of
https://github.com/YACReader/yacreader
synced 2025-07-29 02:15:07 -04:00
No more crashes opening sibling comics in YACReader (by now). //TODO check sync issues
This commit is contained in:
@ -937,27 +937,31 @@ void Render::setNumPages(unsigned int numPages)
|
||||
|
||||
void Render::pageRawDataReady(int page)
|
||||
{
|
||||
pagesEmited.push_back(page);
|
||||
if(pageRenders.size()>0)
|
||||
{
|
||||
for(int i=0;i<pagesEmited.size();i++)
|
||||
{
|
||||
if (!hasLoadedComic())
|
||||
return;
|
||||
|
||||
pagesEmited.push_back(page);
|
||||
if(pageRenders.size()>0)
|
||||
{
|
||||
for(int i=0;i<pagesEmited.size();i++)
|
||||
{
|
||||
if(pagesEmited.at(i)>= pagesReady.size())
|
||||
return;
|
||||
pagesReady[pagesEmited.at(i)] = true;
|
||||
if(pagesEmited.at(i) == currentIndex)
|
||||
update();
|
||||
else
|
||||
{
|
||||
if ( ((pagesEmited.at(i) < currentIndex) && (pagesEmited.at(i) > currentIndex-numLeftPages)) ||
|
||||
((pagesEmited.at(i) > currentIndex) && (pagesEmited.at(i) < currentIndex+numRightPages)) )
|
||||
{
|
||||
fillBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
pagesEmited.clear();
|
||||
}
|
||||
return; //Oooops, something went wrong
|
||||
|
||||
pagesReady[pagesEmited.at(i)] = true;
|
||||
if(pagesEmited.at(i) == currentIndex)
|
||||
update();
|
||||
else
|
||||
{
|
||||
if ( ((pagesEmited.at(i) < currentIndex) && (pagesEmited.at(i) > currentIndex-numLeftPages)) ||
|
||||
((pagesEmited.at(i) > currentIndex) && (pagesEmited.at(i) < currentIndex+numRightPages)) )
|
||||
{
|
||||
fillBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
pagesEmited.clear();
|
||||
}
|
||||
}
|
||||
|
||||
//s<>lo se renderiza la p<>gina, si ha habido un cambio de p<>gina
|
||||
|
Reference in New Issue
Block a user