mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -04:00
bug fixed onpening next/previous folder
This commit is contained in:
@ -863,8 +863,13 @@ void MainWindowViewer::openPreviousComic()
|
||||
if(!siblingComics.isEmpty())
|
||||
{
|
||||
int currentIndex = siblingComics.indexOf(currentComicDB);
|
||||
currentComicDB = siblingComics.at(currentIndex-1);
|
||||
open(currentDirectory+currentComicDB.path,currentComicDB,siblingComics);
|
||||
if (currentIndex == -1)
|
||||
return;
|
||||
if(currentIndex-1 >= 0 && currentIndex-1 < siblingComics.count())
|
||||
{
|
||||
currentComicDB = siblingComics.at(currentIndex-1);
|
||||
open(currentDirectory+currentComicDB.path,currentComicDB,siblingComics);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!previousComicPath.isEmpty())
|
||||
@ -882,9 +887,13 @@ void MainWindowViewer::openNextComic()
|
||||
if(!siblingComics.isEmpty())
|
||||
{
|
||||
int currentIndex = siblingComics.indexOf(currentComicDB);
|
||||
if (currentIndex == -1)
|
||||
return;
|
||||
if(currentIndex+1 > 0 && currentIndex+1 < siblingComics.count())
|
||||
currentComicDB = siblingComics.at(currentIndex+1);
|
||||
open(currentDirectory+currentComicDB.path,currentComicDB,siblingComics);
|
||||
{
|
||||
currentComicDB = siblingComics.at(currentIndex+1);
|
||||
open(currentDirectory+currentComicDB.path,currentComicDB,siblingComics);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!nextComicPath.isEmpty())
|
||||
|
Reference in New Issue
Block a user