Document mode: Don't automatically select a new document when deleting one

preferencesAboutTextFull
Craig Watson 8 years ago
parent 09ab3e19d0
commit 67d3a34b0b
  1. 10
      src/document/UBDocumentController.cpp

@ -805,10 +805,12 @@ void UBDocumentController::deleteTreeItem(QTreeWidgetItem * item, bool showConfi
document->parent()->removeChild(document); document->parent()->removeChild(document);
UBPersistenceManager::persistenceManager()->deleteDocument(document->proxy()); UBPersistenceManager::persistenceManager()->deleteDocument(document->proxy());
if (mTrashTi->childCount()==0) if (selectNewDocument) {
selectDocument(NULL); if (mTrashTi->childCount()==0)
else selectDocument(NULL);
selectDocument(((UBDocumentProxyTreeItem*)mTrashTi->child(0))->proxy()); else
selectDocument(((UBDocumentProxyTreeItem*)mTrashTi->child(0))->proxy());
}
reloadThumbnails(); reloadThumbnails();
} }

Loading…
Cancel
Save