Implement nre doc merge functionality in tree

This commit is contained in:
Veronica Berglyd Olsen
2022-10-09 17:19:01 +02:00
parent e1c3a12d07
commit 0f3d598f8d
4 changed files with 156 additions and 70 deletions
+16
View File
@@ -88,6 +88,9 @@ class GuiDocMerge(QDialog):
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
self.resetButton = self.buttonBox.addButton(QDialogButtonBox.Reset)
self.resetButton.clicked.connect(self._resetList)
# Assemble
self.outerBox = QVBoxLayout()
self.outerBox.setSpacing(0)
@@ -122,6 +125,19 @@ class GuiDocMerge(QDialog):
return self._data
##
# Slots
##
def _resetList(self):
"""Reset the content of the list box to its original state.
"""
logger.debug("Resetting list box content")
sHandle = self._data.get("sHandle", None)
itemList = self._data.get("origItems", [])
self._loadContent(sHandle, itemList)
return
##
# Internal Functions
##