fixed a crash caused by scene indexes deleted in ascending order

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent 03bd003c9a
commit ee0ce30201
  1. 1
      src/document/UBDocumentController.cpp

@ -3649,6 +3649,7 @@ void UBDocumentController::deletePages(QList<QGraphicsItem *> itemsToDelete)
UBDocumentContainer::deletePages(sceneIndexes); UBDocumentContainer::deletePages(sceneIndexes);
if (mBoardController->selectedDocument() == selectedDocument()) if (mBoardController->selectedDocument() == selectedDocument())
{ {
std::sort(sceneIndexes.begin(), sceneIndexes.end(), std::greater<>());
for (auto index : sceneIndexes) for (auto index : sceneIndexes)
mBoardController->deleteThumbPage(index); mBoardController->deleteThumbPage(index);
} }

Loading…
Cancel
Save