Commit 865f0769 authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

SANKORE-628

QT:Sankore crashes after page shuffled on a document palette
parent ff32e977
...@@ -71,9 +71,15 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow) ...@@ -71,9 +71,15 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow)
{ {
setupViews(); setupViews();
setupToolbar(); setupToolbar();
this->selectDocument(UBApplication::boardController->activeDocument());
connect(this, SIGNAL(exportDone()), mMainWindow, SLOT(onExportDone())); connect(this, SIGNAL(exportDone()), mMainWindow, SLOT(onExportDone()));
connect(mMainWindow->actionNewPage, SIGNAL(triggered()), this, SLOT(reloadThumbs()));
} }
void UBDocumentController::reloadThumbs()
{
mDocumentThumbs = UBThumbnailAdaptor::load(selectedDocumentProxy());
}
UBDocumentController::~UBDocumentController() UBDocumentController::~UBDocumentController()
{ {
......
...@@ -75,6 +75,7 @@ class UBDocumentController : public QObject ...@@ -75,6 +75,7 @@ class UBDocumentController : public QObject
void copy(); void copy();
void paste(); void paste();
void focusChanged(QWidget *old, QWidget *current); void focusChanged(QWidget *old, QWidget *current);
void reloadThumbs();
protected: protected:
virtual void setupViews(); virtual void setupViews();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment