Remove unused code and reuse a few lines in split/merge tools

This commit is contained in:
Veronica K. B. Olsen
2020-09-24 23:30:59 +02:00
parent ad50ef6e8c
commit 008117fece
3 changed files with 2 additions and 30 deletions
-26
View File
@@ -122,32 +122,6 @@ class Tokenizer():
return
def clearData(self):
"""Clear the data arrays and variables, but not settings, so the class
can be reused for multiple documents.
"""
self.theText = None
self.theHandle = None
self.theItem = None
self.theTokens = None
self.theResult = None
self.theMarkdown = None
self.numChapter = 0
self.firstScene = False
self.isNone = False
self.isTitle = False
self.isBook = False
self.isPage = False
self.isPart = False
self.isUnNum = False
self.isChap = False
self.isScene = False
self.isNote = False
self.isNovel = False
return
##
# Setters
##
+1 -2
View File
@@ -136,14 +136,13 @@ class GuiDocMerge(QDialog):
self.theParent.treeView.revealTreeItem(nHandle)
self.theParent.openDocument(nHandle, doScroll=True)
self.close()
self._doClose()
return
def _doClose(self):
"""Close the dialog window without doing anything.
"""
logger.verbose("GuiDocMerge close button clicked")
self.close()
return
+1 -2
View File
@@ -214,14 +214,13 @@ class GuiDocSplit(QDialog):
theDoc.clearDocument()
self.theParent.treeView.revealTreeItem(nHandle)
self.close()
self._doClose()
return
def _doClose(self):
"""Close the dialog window without doing anything.
"""
logger.verbose("GuiDocSplit close button clicked")
self.optState.saveSettings()
self.close()
return