Remove unused code and reuse a few lines in split/merge tools
This commit is contained in:
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user