Also have the merge tool preserve item status of the source item
This commit is contained in:
+11
-2
@@ -109,15 +109,24 @@ class GuiDocMerge(QDialog):
|
|||||||
|
|
||||||
if self.sourceItem is None:
|
if self.sourceItem is None:
|
||||||
self.theParent.makeAlert((
|
self.theParent.makeAlert((
|
||||||
"Cannot parse source item."
|
"No source document selected. Nothing to do."
|
||||||
), nwAlert.ERROR)
|
), nwAlert.ERROR)
|
||||||
return
|
return
|
||||||
|
|
||||||
srcItem = self.theProject.projTree[self.sourceItem]
|
srcItem = self.theProject.projTree[self.sourceItem]
|
||||||
|
if srcItem is None:
|
||||||
|
self.theParent.makeAlert((
|
||||||
|
"Could not parse source document."
|
||||||
|
), nwAlert.ERROR)
|
||||||
|
return
|
||||||
|
|
||||||
nHandle = self.theProject.newFile(srcItem.itemName, srcItem.itemClass, srcItem.parHandle)
|
nHandle = self.theProject.newFile(srcItem.itemName, srcItem.itemClass, srcItem.parHandle)
|
||||||
self.theParent.treeView.revealTreeItem(nHandle)
|
newItem = self.theProject.projTree[nHandle]
|
||||||
|
newItem.setStatus(srcItem.itemStatus)
|
||||||
|
|
||||||
theDoc.openDocument(nHandle, False)
|
theDoc.openDocument(nHandle, False)
|
||||||
theDoc.saveDocument(theText)
|
theDoc.saveDocument(theText)
|
||||||
|
self.theParent.treeView.revealTreeItem(nHandle)
|
||||||
self.theParent.openDocument(nHandle, doScroll=True)
|
self.theParent.openDocument(nHandle, doScroll=True)
|
||||||
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user