removed a second message box on deletion

preferencesAboutTextFull
Clément Fauconnier 6 years ago
parent fca4b6c989
commit d978534980
  1. 7
      src/document/UBDocumentController.cpp

@ -1449,6 +1449,9 @@ void UBDocumentTreeView::dropEvent(QDropEvent *event)
if(targetIsInTrash) if(targetIsInTrash)
{ {
if (!UBApplication::mainWindow->yesNoQuestion(tr("Remove Item"), tr("Are you sure you want to remove the selected item(s) ?")))
return;
UBApplication::documentController->moveIndexesToTrash(dropIndex, docModel); UBApplication::documentController->moveIndexesToTrash(dropIndex, docModel);
}else{ }else{
docModel->moveIndexes(dropIndex, targetIndex); docModel->moveIndexes(dropIndex, targetIndex);
@ -3146,9 +3149,6 @@ void UBDocumentController::deletePages(QList<QGraphicsItem *> itemsToDelete)
} }
} }
if(UBApplication::mainWindow->yesNoQuestion(tr("Remove Page"), tr("Are you sure you want to remove %n page(s) from the selected document '%1'?", "", sceneIndexes.count()).arg(proxy->metaData(UBSettings::documentName).toString())))
{
UBDocumentContainer::deletePages(sceneIndexes); UBDocumentContainer::deletePages(sceneIndexes);
emit UBApplication::boardController->documentThumbnailsUpdated(this); emit UBApplication::boardController->documentThumbnailsUpdated(this);
@ -3170,7 +3170,6 @@ void UBDocumentController::deletePages(QList<QGraphicsItem *> itemsToDelete)
mBoardController->reloadThumbnails(); mBoardController->reloadThumbnails();
} }
} }
}
int UBDocumentController::getSelectedItemIndex() int UBDocumentController::getSelectedItemIndex()
{ {

Loading…
Cancel
Save