Merge branch 'main' into dev
This commit is contained in:
@@ -2,6 +2,17 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h2>Release Notes for 1.3.2</h2>
|
||||
<p><i>Released on 30 May 2021</i></p>
|
||||
<p>This is a patch release that fixes some minor issues. One issue was with the split tool, which
|
||||
would drop the last line from the source document during a split if it was missing a final line
|
||||
break. A minor issue with the display of word counts on the details panel under the project tree
|
||||
has also been fixed. In addition, the setup script commands for Linux have been improved a bit.</p>
|
||||
|
||||
<p><i>See also the <a href="https://github.com/vkbo/novelWriter/releases">Releases</a> page.</i></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Release Notes for 1.3.1</h2>
|
||||
<p><i>Released on 6 May 2021</i></p>
|
||||
<p>This is a patch release primarily to fix a problem with the Qt translation library used to make
|
||||
@@ -10,8 +21,6 @@ added recently, in Qt 5.15, which many users on Linux will not have installed on
|
||||
issue could be resolved by updating the library, but it's an unnecessary and inconvenient
|
||||
restriction.</p>
|
||||
|
||||
<p><i>See also the <a href="https://github.com/vkbo/novelWriter/releases">Releases</a> page.</i></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Release Notes for 1.3</h2>
|
||||
|
||||
+9
-11
@@ -52,7 +52,9 @@ class GuiDocSplit(QDialog):
|
||||
self.theParent = theParent
|
||||
self.theProject = theParent.theProject
|
||||
self.optState = theParent.theProject.optState
|
||||
|
||||
self.sourceItem = None
|
||||
self.sourceText = []
|
||||
|
||||
self.outerBox = QVBoxLayout()
|
||||
self.setWindowTitle(self.tr("Split Document"))
|
||||
@@ -139,9 +141,7 @@ class GuiDocSplit(QDialog):
|
||||
if theText is None:
|
||||
theText = ""
|
||||
|
||||
theLines = theText.splitlines()
|
||||
nLines = len(theLines)
|
||||
theLines.insert(0, "%Split Doc")
|
||||
nLines = len(self.sourceText)
|
||||
logger.debug(
|
||||
"Splitting document %s with %d lines" % (self.sourceItem, nLines)
|
||||
)
|
||||
@@ -218,11 +218,11 @@ class GuiDocSplit(QDialog):
|
||||
newItem.setStatus(srcItem.itemStatus)
|
||||
logger.verbose(
|
||||
"Creating new document %s with text from line %d to %d" % (
|
||||
nHandle, iStart, iEnd-1
|
||||
nHandle, iStart+1, iEnd
|
||||
)
|
||||
)
|
||||
|
||||
theText = "\n".join(theLines[iStart:iEnd])
|
||||
theText = "\n".join(self.sourceText[iStart:iEnd])
|
||||
theText = theText.rstrip("\n") + "\n\n"
|
||||
|
||||
outDoc = NWDoc(self.theProject, nHandle)
|
||||
@@ -284,12 +284,10 @@ class GuiDocSplit(QDialog):
|
||||
"Scanning document %s for headings level <= %d" % (self.sourceItem, spLevel)
|
||||
)
|
||||
|
||||
lineNo = 0
|
||||
for aLine in theText.splitlines():
|
||||
|
||||
lineNo += 1
|
||||
onLine = 0
|
||||
self.sourceText = theText.splitlines()
|
||||
for lineNo, aLine in enumerate(self.sourceText):
|
||||
|
||||
onLine = -1
|
||||
if aLine.startswith("# ") and spLevel >= 1:
|
||||
onLine = lineNo
|
||||
elif aLine.startswith("## ") and spLevel >= 2:
|
||||
@@ -299,7 +297,7 @@ class GuiDocSplit(QDialog):
|
||||
elif aLine.startswith("#### ") and spLevel >= 4:
|
||||
onLine = lineNo
|
||||
|
||||
if onLine > 0:
|
||||
if onLine >= 0:
|
||||
newItem = QListWidgetItem()
|
||||
newItem.setText(aLine.strip())
|
||||
newItem.setData(Qt.UserRole, onLine)
|
||||
|
||||
Reference in New Issue
Block a user