Added a check in merge documents that there is actually something to merge

This commit is contained in:
Veronica K. B. Olsen
2020-09-19 16:38:31 +02:00
parent 43fc829c4f
commit 2ae6646885
+6
View File
@@ -101,6 +101,12 @@ class GuiDocMerge(QDialog):
for i in range(self.listBox.count()):
finalOrder.append(self.listBox.item(i).data(Qt.UserRole))
if len(finalOrder) == 0:
self.theParent.makeAlert((
"No source documents found. Nothing to do."
), nwAlert.ERROR)
return
theDoc = NWDoc(self.theProject, self.theParent)
theText = ""
for tHandle in finalOrder: