Merge branch 'main' into feature/build_gui
This commit is contained in:
@@ -126,5 +126,14 @@ to ODF 1.3 extended format, and passes validation.</p>
|
||||
<p>An Italian translation has been added, and Russian is currently available for project builds. A
|
||||
full translation into Russian is on its way.</p>
|
||||
|
||||
<h3>Patch 2.0.6 – 26 February 2023</h3>
|
||||
|
||||
<p>This is a patch release that fixes a few minor bugs and a broken feature.</p>
|
||||
<p>When opening a document from the Novel Tree or Outline View, the Project Tree would receive
|
||||
focus even when it was hidden. This has been corrected and no focus change is made. The Project
|
||||
Tree now also receives focus automatically when a new Project Item is created.</p>
|
||||
<p>The backlinks in the Reference Panel below the Document Viewer were no longer working. They have
|
||||
now been fixed. They were broken due to a change in the link format in 2.0.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1201,17 +1201,18 @@ class GuiDocViewDetails(QScrollArea):
|
||||
return
|
||||
|
||||
##
|
||||
# Internal Functions
|
||||
# Private Slots
|
||||
##
|
||||
|
||||
@pyqtSlot(str)
|
||||
def _linkClicked(self, theLink):
|
||||
"""Capture the link-click and forward it to the document viewer
|
||||
class for handling.
|
||||
"""
|
||||
logger.debug("Clicked link: '%s'", theLink)
|
||||
if len(theLink) == 21:
|
||||
if len(theLink) >= 13:
|
||||
tHandle = theLink[:13]
|
||||
tAnchor = theLink[13:]
|
||||
tAnchor = theLink[13:] or None
|
||||
self.mainGui.viewDocument(tHandle, tAnchor)
|
||||
return
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ from PyQt5.QtWidgets import (
|
||||
QVBoxLayout, QWidget
|
||||
)
|
||||
|
||||
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert
|
||||
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert, nwWidget
|
||||
from novelwriter.constants import nwHeaders, nwUnicode, trConst, nwLabels
|
||||
from novelwriter.core.coretools import DocMerger, DocSplitter
|
||||
from novelwriter.dialogs.docmerge import GuiDocMerge
|
||||
@@ -630,6 +630,7 @@ class GuiProjectTree(QTreeWidget):
|
||||
|
||||
# Add the new item to the project tree
|
||||
self.revealNewTreeItem(tHandle, nHandle=nHandle, wordCount=True)
|
||||
self.mainGui.switchFocus(nwWidget.TREE)
|
||||
|
||||
return True
|
||||
|
||||
@@ -1087,7 +1088,6 @@ class GuiProjectTree(QTreeWidget):
|
||||
if tItem is None:
|
||||
return False
|
||||
|
||||
self.setFocus()
|
||||
if tHandle in self._treeMap:
|
||||
self.setCurrentItem(self._treeMap[tHandle])
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ class GuiMain(QMainWindow):
|
||||
self.splitDocs.setOpaqueResize(False)
|
||||
self.splitDocs.setHandleWidth(hWd)
|
||||
|
||||
# Splitter : Project Tree / Main Tabs
|
||||
# Splitter : Project Tree / Document Area
|
||||
self.splitMain = QSplitter(Qt.Horizontal)
|
||||
self.splitMain.setContentsMargins(0, 0, 0, 0)
|
||||
self.splitMain.addWidget(self.treePane)
|
||||
@@ -185,7 +185,7 @@ class GuiMain(QMainWindow):
|
||||
self.idxViewDoc = self.splitView.indexOf(self.docViewer)
|
||||
self.idxViewMeta = self.splitView.indexOf(self.viewMeta)
|
||||
|
||||
# Indices of Tab Widgets
|
||||
# Indices of Stack Widgets
|
||||
self.idxEditorView = self.mainStack.indexOf(self.splitMain)
|
||||
self.idxOutlineView = self.mainStack.indexOf(self.outlineView)
|
||||
self.idxProjView = self.projStack.indexOf(self.projView)
|
||||
@@ -199,6 +199,9 @@ class GuiMain(QMainWindow):
|
||||
self.splitView.setCollapsible(self.idxViewDoc, False)
|
||||
self.splitView.setCollapsible(self.idxViewMeta, False)
|
||||
|
||||
self.splitMain.setStretchFactor(self.idxTree, 0)
|
||||
self.splitMain.setStretchFactor(self.idxMain, 1)
|
||||
|
||||
# Editor / Viewer Default State
|
||||
self.splitView.setVisible(False)
|
||||
self.docEditor.closeSearch()
|
||||
|
||||
Reference in New Issue
Block a user