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

don't move indexes if we're moving an document's page

parent 60b433a6
...@@ -1451,15 +1451,17 @@ void UBDocumentTreeView::dropEvent(QDropEvent *event) ...@@ -1451,15 +1451,17 @@ void UBDocumentTreeView::dropEvent(QDropEvent *event)
docModel->setHighLighted(QModelIndex()); docModel->setHighLighted(QModelIndex());
} }
else
if(targetIsInTrash)
{ {
if (!UBApplication::mainWindow->yesNoQuestion(tr("Remove Item"), tr("Are you sure you want to remove the selected item(s) ?"))) if(targetIsInTrash)
return; {
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);
}
} }
expand(proxy->mapFromSource(targetIndex)); expand(proxy->mapFromSource(targetIndex));
......
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