diff --git a/nw/enum.py b/nw/enum.py index 7b3c8aaa..1a24a7a8 100644 --- a/nw/enum.py +++ b/nw/enum.py @@ -95,11 +95,10 @@ class nwDocAction(Enum): class nwDocInsert(Enum): NO_INSERT = 0 - HARD_BREAK = 1 - QUOTE_LS = 2 - QUOTE_RS = 3 - QUOTE_LD = 4 - QUOTE_RD = 5 + QUOTE_LS = 1 + QUOTE_RS = 2 + QUOTE_LD = 3 + QUOTE_RD = 4 # END Enum nwDocInsert diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 9095dea0..a6b853b8 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -840,9 +840,7 @@ class GuiDocEditor(QTextEdit): if isinstance(theInsert, str): theText = theInsert elif isinstance(theInsert, nwDocInsert): - if theInsert == nwDocInsert.HARD_BREAK: - theText = " \n" - elif theInsert == nwDocInsert.QUOTE_LS: + if theInsert == nwDocInsert.QUOTE_LS: theText = self._typSQOpen elif theInsert == nwDocInsert.QUOTE_RS: theText = self._typSQClose diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index 402e40a9..947b0722 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -634,15 +634,8 @@ class GuiMainMenu(QMenuBar): self.aInsDPrime.triggered.connect(lambda: self._docInsert(nwUnicode.U_DPRIME)) self.mInsPunct.addAction(self.aInsDPrime) - # Insert > Breaks and Spaces - self.mInsBreaks = self.insertMenu.addMenu(self.tr("Breaks and 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 > White Spaces + self.mInsBreaks = self.insertMenu.addMenu(self.tr("White Spaces")) # Insert > Non-Breaking Space self.aInsNBSpace = QAction(self.tr("Non-Breaking Space"), self) diff --git a/nw/guimain.py b/nw/guimain.py index e0f5c42b..2db0add2 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -1318,7 +1318,6 @@ class GuiMain(QMainWindow): self.addAction(self.mainMenu.aInsEllipsis) self.addAction(self.mainMenu.aInsPrime) self.addAction(self.mainMenu.aInsDPrime) - self.addAction(self.mainMenu.aInsHardBreak) self.addAction(self.mainMenu.aInsNBSpace) self.addAction(self.mainMenu.aInsThinSpace) self.addAction(self.mainMenu.aInsThinNBSpace) diff --git a/tests/test_gui/test_gui_mainmenu.py b/tests/test_gui/test_gui_mainmenu.py index 9b9af54d..28aadffc 100644 --- a/tests/test_gui/test_gui_mainmenu.py +++ b/tests/test_gui/test_gui_mainmenu.py @@ -467,10 +467,6 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncDir, fncProj): assert nwGUI.docEditor.getText() == nwUnicode.U_DIVIDE nwGUI.docEditor.clear() - nwGUI.mainMenu.aInsHardBreak.activate(QAction.Trigger) - assert nwGUI.docEditor.getText() == " \n" - nwGUI.docEditor.clear() - nwGUI.mainMenu.aInsNBSpace.activate(QAction.Trigger) if nwGUI.mainConf.verQtValue >= 50900: assert nwGUI.docEditor.getText() == nwUnicode.U_NBSP