Remove hard line break menu entry
This commit is contained in:
+4
-5
@@ -95,11 +95,10 @@ class nwDocAction(Enum):
|
|||||||
class nwDocInsert(Enum):
|
class nwDocInsert(Enum):
|
||||||
|
|
||||||
NO_INSERT = 0
|
NO_INSERT = 0
|
||||||
HARD_BREAK = 1
|
QUOTE_LS = 1
|
||||||
QUOTE_LS = 2
|
QUOTE_RS = 2
|
||||||
QUOTE_RS = 3
|
QUOTE_LD = 3
|
||||||
QUOTE_LD = 4
|
QUOTE_RD = 4
|
||||||
QUOTE_RD = 5
|
|
||||||
|
|
||||||
# END Enum nwDocInsert
|
# END Enum nwDocInsert
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -840,9 +840,7 @@ class GuiDocEditor(QTextEdit):
|
|||||||
if isinstance(theInsert, str):
|
if isinstance(theInsert, str):
|
||||||
theText = theInsert
|
theText = theInsert
|
||||||
elif isinstance(theInsert, nwDocInsert):
|
elif isinstance(theInsert, nwDocInsert):
|
||||||
if theInsert == nwDocInsert.HARD_BREAK:
|
if theInsert == nwDocInsert.QUOTE_LS:
|
||||||
theText = " \n"
|
|
||||||
elif theInsert == nwDocInsert.QUOTE_LS:
|
|
||||||
theText = self._typSQOpen
|
theText = self._typSQOpen
|
||||||
elif theInsert == nwDocInsert.QUOTE_RS:
|
elif theInsert == nwDocInsert.QUOTE_RS:
|
||||||
theText = self._typSQClose
|
theText = self._typSQClose
|
||||||
|
|||||||
+2
-9
@@ -634,15 +634,8 @@ class GuiMainMenu(QMenuBar):
|
|||||||
self.aInsDPrime.triggered.connect(lambda: self._docInsert(nwUnicode.U_DPRIME))
|
self.aInsDPrime.triggered.connect(lambda: self._docInsert(nwUnicode.U_DPRIME))
|
||||||
self.mInsPunct.addAction(self.aInsDPrime)
|
self.mInsPunct.addAction(self.aInsDPrime)
|
||||||
|
|
||||||
# Insert > Breaks and Spaces
|
# Insert > White Spaces
|
||||||
self.mInsBreaks = self.insertMenu.addMenu(self.tr("Breaks and Spaces"))
|
self.mInsBreaks = self.insertMenu.addMenu(self.tr("White Spaces"))
|
||||||
|
|
||||||
# Insert > Hard Line Break
|
|
||||||
self.aInsHardBreak = QAction(self.tr("Hard Line Break"), self)
|
|
||||||
self.aInsHardBreak.setStatusTip(self.tr("Insert a hard line break"))
|
|
||||||
self.aInsHardBreak.setShortcut("Ctrl+K, Return")
|
|
||||||
self.aInsHardBreak.triggered.connect(lambda: self._docInsert(nwDocInsert.HARD_BREAK))
|
|
||||||
self.mInsBreaks.addAction(self.aInsHardBreak)
|
|
||||||
|
|
||||||
# Insert > Non-Breaking Space
|
# Insert > Non-Breaking Space
|
||||||
self.aInsNBSpace = QAction(self.tr("Non-Breaking Space"), self)
|
self.aInsNBSpace = QAction(self.tr("Non-Breaking Space"), self)
|
||||||
|
|||||||
@@ -1318,7 +1318,6 @@ class GuiMain(QMainWindow):
|
|||||||
self.addAction(self.mainMenu.aInsEllipsis)
|
self.addAction(self.mainMenu.aInsEllipsis)
|
||||||
self.addAction(self.mainMenu.aInsPrime)
|
self.addAction(self.mainMenu.aInsPrime)
|
||||||
self.addAction(self.mainMenu.aInsDPrime)
|
self.addAction(self.mainMenu.aInsDPrime)
|
||||||
self.addAction(self.mainMenu.aInsHardBreak)
|
|
||||||
self.addAction(self.mainMenu.aInsNBSpace)
|
self.addAction(self.mainMenu.aInsNBSpace)
|
||||||
self.addAction(self.mainMenu.aInsThinSpace)
|
self.addAction(self.mainMenu.aInsThinSpace)
|
||||||
self.addAction(self.mainMenu.aInsThinNBSpace)
|
self.addAction(self.mainMenu.aInsThinNBSpace)
|
||||||
|
|||||||
@@ -467,10 +467,6 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncDir, fncProj):
|
|||||||
assert nwGUI.docEditor.getText() == nwUnicode.U_DIVIDE
|
assert nwGUI.docEditor.getText() == nwUnicode.U_DIVIDE
|
||||||
nwGUI.docEditor.clear()
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
nwGUI.mainMenu.aInsHardBreak.activate(QAction.Trigger)
|
|
||||||
assert nwGUI.docEditor.getText() == " \n"
|
|
||||||
nwGUI.docEditor.clear()
|
|
||||||
|
|
||||||
nwGUI.mainMenu.aInsNBSpace.activate(QAction.Trigger)
|
nwGUI.mainMenu.aInsNBSpace.activate(QAction.Trigger)
|
||||||
if nwGUI.mainConf.verQtValue >= 50900:
|
if nwGUI.mainConf.verQtValue >= 50900:
|
||||||
assert nwGUI.docEditor.getText() == nwUnicode.U_NBSP
|
assert nwGUI.docEditor.getText() == nwUnicode.U_NBSP
|
||||||
|
|||||||
Reference in New Issue
Block a user