mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed ThumbnailCreator _numPages and _coverPage
This commit is contained in:
parent
731b3fa476
commit
adcd9f820d
@ -477,8 +477,8 @@ void ThumbnailCreator::create()
|
|||||||
//se filtran para obtener sólo los formatos soportados
|
//se filtran para obtener sólo los formatos soportados
|
||||||
QList<QString> order = archive.getFileNames();
|
QList<QString> order = archive.getFileNames();
|
||||||
QList<QString> fileNames = FileComic::filter(order);
|
QList<QString> fileNames = FileComic::filter(order);
|
||||||
|
_numPages = fileNames.size();
|
||||||
if(fileNames.size() == 0)
|
if(_numPages == 0)
|
||||||
{
|
{
|
||||||
_cover.load(":/images/notCover.png");
|
_cover.load(":/images/notCover.png");
|
||||||
if(_target!="")
|
if(_target!="")
|
||||||
@ -486,8 +486,10 @@ void ThumbnailCreator::create()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(_coverPage > _numPages)
|
||||||
|
_coverPage = 1;
|
||||||
qSort(fileNames.begin(),fileNames.end(), naturalSortLessThanCI);
|
qSort(fileNames.begin(),fileNames.end(), naturalSortLessThanCI);
|
||||||
int index = order.indexOf(fileNames.first());
|
int index = order.indexOf(fileNames.at(_coverPage-1));
|
||||||
|
|
||||||
if(_target=="")
|
if(_target=="")
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user