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

preferencesAboutTextFull
Clément Fauconnier 6 years ago
parent 60b433a6ec
commit afb5b65458
  1. 16
      src/document/UBDocumentController.cpp

@ -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));

Loading…
Cancel
Save