mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 00:58:32 -04:00
bug fixed onpening next/previous folder
This commit is contained in:
parent
bf8c0109eb
commit
0d83e0a117
@ -424,6 +424,7 @@ void FileComic::process()
|
|||||||
out << "--tiempo en copiar datos : " << myTimer.elapsed() << endl;
|
out << "--tiempo en copiar datos : " << myTimer.elapsed() << endl;
|
||||||
f.close();
|
f.close();
|
||||||
emit imagesLoaded();
|
emit imagesLoaded();
|
||||||
|
moveToThread(QApplication::instance()->thread());
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void FileComic::loadSizes()
|
void FileComic::loadSizes()
|
||||||
@ -544,6 +545,7 @@ void FolderComic::process()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit imagesLoaded();
|
emit imagesLoaded();
|
||||||
|
moveToThread(QApplication::instance()->thread());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -618,6 +620,7 @@ void PDFComic::process()
|
|||||||
|
|
||||||
delete pdfComic;
|
delete pdfComic;
|
||||||
emit imagesLoaded();
|
emit imagesLoaded();
|
||||||
|
moveToThread(QApplication::instance()->thread());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDFComic::renderPage(int page)
|
void PDFComic::renderPage(int page)
|
||||||
|
@ -863,8 +863,13 @@ void MainWindowViewer::openPreviousComic()
|
|||||||
if(!siblingComics.isEmpty())
|
if(!siblingComics.isEmpty())
|
||||||
{
|
{
|
||||||
int currentIndex = siblingComics.indexOf(currentComicDB);
|
int currentIndex = siblingComics.indexOf(currentComicDB);
|
||||||
currentComicDB = siblingComics.at(currentIndex-1);
|
if (currentIndex == -1)
|
||||||
open(currentDirectory+currentComicDB.path,currentComicDB,siblingComics);
|
return;
|
||||||
|
if(currentIndex-1 >= 0 && currentIndex-1 < siblingComics.count())
|
||||||
|
{
|
||||||
|
currentComicDB = siblingComics.at(currentIndex-1);
|
||||||
|
open(currentDirectory+currentComicDB.path,currentComicDB,siblingComics);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!previousComicPath.isEmpty())
|
if(!previousComicPath.isEmpty())
|
||||||
@ -882,9 +887,13 @@ void MainWindowViewer::openNextComic()
|
|||||||
if(!siblingComics.isEmpty())
|
if(!siblingComics.isEmpty())
|
||||||
{
|
{
|
||||||
int currentIndex = siblingComics.indexOf(currentComicDB);
|
int currentIndex = siblingComics.indexOf(currentComicDB);
|
||||||
|
if (currentIndex == -1)
|
||||||
|
return;
|
||||||
if(currentIndex+1 > 0 && currentIndex+1 < siblingComics.count())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if(!nextComicPath.isEmpty())
|
if(!nextComicPath.isEmpty())
|
||||||
|
@ -54,12 +54,10 @@ struct SevenZipInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//SevenZipInterface * szInterface;
|
//SevenZipInterface * szInterface;
|
||||||
QLibrary * sevenzLib = 0;
|
|
||||||
|
|
||||||
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent),sevenzLib(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
szInterface = new SevenZipInterface;
|
szInterface = new SevenZipInterface;
|
||||||
//load functions
|
//load functions
|
||||||
loadFunctions();
|
loadFunctions();
|
||||||
|
@ -42,7 +42,7 @@ public slots:
|
|||||||
QList<QString> getFileNames();
|
QList<QString> getFileNames();
|
||||||
private:
|
private:
|
||||||
SevenZipInterface * szInterface;
|
SevenZipInterface * szInterface;
|
||||||
|
QLibrary * sevenzLib;
|
||||||
void loadFunctions();
|
void loadFunctions();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user