From 723ef7b2633e3717d9a1dc5c7c7b8ebeac882d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Tue, 23 Jan 2018 11:15:26 +0100 Subject: [PATCH] fixed a bug where adding an existing page to the curent document resulted in a crash --- src/board/UBBoardController.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 1a983df3..e5ce8e36 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -550,6 +550,7 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp if (replaceActiveIfEmpty && mActiveScene->isEmpty()) { UBPersistenceManager::persistenceManager()->insertDocumentSceneAt(selectedDocument(), clone, mActiveSceneIndex); + emit addThumbnailRequired(this, mActiveSceneIndex); setActiveDocumentScene(mActiveSceneIndex); deleteScene(mActiveSceneIndex + 1); } @@ -557,6 +558,7 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp { persistCurrentScene(false,true); UBPersistenceManager::persistenceManager()->insertDocumentSceneAt(selectedDocument(), clone, mActiveSceneIndex + 1); + emit addThumbnailRequired(this, mActiveSceneIndex + 1); setActiveDocumentScene(mActiveSceneIndex + 1); }