@ -64,8 +64,6 @@
#include "core/UBApplication.h"
#include "core/UBTextTools.h"
#include "document/UBDocumentContainer.h"
#include "pdf/PDFRenderer.h"
#include "core/memcheck.h"
@ -51,6 +51,9 @@ class UBDocumentContainer : public QObject
void updatePage(int index);
void addEmptyThumbPage();
void insertThumbPage(int index);
private:
UBDocumentProxy* mCurrentDocument;
QList<const QPixmap*> mDocumentThumbs;
@ -59,7 +62,6 @@ class UBDocumentContainer : public QObject
protected:
void deleteThumbPage(int index);
void updateThumbPage(int index);
void reloadThumbnails();
signals:
@ -99,6 +99,11 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
for(int i = 0; i < source->selectedDocument()->pageCount(); i++)
{
//claudio This is a very bad hack and shows a architectural problem
// source->selectedDocument()->pageCount() != source->pageCount()
if(i>=source->pageCount())
source->insertThumbPage(i);
const QPixmap* pix = source->pageAt(i);
Q_ASSERT(!pix->isNull());
int pageIndex = UBDocumentContainer::pageFromSceneIndex(i);
@ -24,6 +24,7 @@
#include "UBDocumentTreeWidget.h"
#include "document/UBDocumentProxy.h"
//#include "document/UBDocumentContainer.h"
#include "core/UBSettings.h"
@ -25,9 +25,6 @@
#include "board/UBBoardController.h"
#include "globals/UBGlobals.h"