increment speed for multipage documens

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent 82cae53808
commit fbced12477
  1. 18
      src/adaptors/UBThumbnailAdaptor.cpp
  2. 2
      src/document/UBDocumentController.cpp

@ -90,28 +90,20 @@ QList<QPixmap> UBThumbnailAdaptor::load(UBDocumentProxy* proxy)
//end compatibility with older format
bool moreToProcess = true;
int pageCount = 0;
while (moreToProcess)
{
while (moreToProcess) {
pageCount++;
QString fileName = proxy->persistencePath() +
UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageCount);
QFile file(fileName);
if (file.exists())
{
if (file.exists()) {
QPixmap pix;
pix.load(fileName);
//Warning. Works only with modified Qt
pix.load(fileName, 0, Qt::AutoColor, false);
thumbnails.append(pix);
}
else
{
} else {
moreToProcess = false;
}
}

@ -270,7 +270,7 @@ void UBDocumentController::refreshDocumentThumbnailsView()
if (proxy)
{
mCurrentDocument = proxy;
mCurrentDocument = proxy;
QList<QPixmap> thumbs = UBThumbnailAdaptor::load(proxy);
for (int i = 0; i < thumbs.count(); i++)

Loading…
Cancel
Save