diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 133f3975..104c1dfd 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -3649,6 +3649,7 @@ void UBDocumentController::deletePages(QList itemsToDelete) UBDocumentContainer::deletePages(sceneIndexes); if (mBoardController->selectedDocument() == selectedDocument()) { + std::sort(sceneIndexes.begin(), sceneIndexes.end(), std::greater<>()); for (auto index : sceneIndexes) mBoardController->deleteThumbPage(index); }