Commit d9785349 authored by Clément Fauconnier's avatar Clément Fauconnier

removed a second message box on deletion

parent fca4b6c9
......@@ -1449,6 +1449,9 @@ void UBDocumentTreeView::dropEvent(QDropEvent *event)
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);
}else{
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);
emit UBApplication::boardController->documentThumbnailsUpdated(this);
......@@ -3169,7 +3169,6 @@ void UBDocumentController::deletePages(QList<QGraphicsItem *> itemsToDelete)
mBoardController->setActiveDocumentScene(minIndex);
mBoardController->reloadThumbnails();
}
}
}
int UBDocumentController::getSelectedItemIndex()
......
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