Fix "Add Word to Dictionary" missing when there are no spell suggestions
This commit is contained in:
+6
-6
@@ -1014,15 +1014,15 @@ class GuiDocEditor(QTextEdit):
|
|||||||
lambda thePos, aWord=aWord : self._correctWord(posCursor, aWord)
|
lambda thePos, aWord=aWord : self._correctWord(posCursor, aWord)
|
||||||
)
|
)
|
||||||
mnuContext.addAction(mnuWord)
|
mnuContext.addAction(mnuWord)
|
||||||
mnuContext.addSeparator()
|
|
||||||
mnuAdd = QAction("Add Word to Dictionary", mnuContext)
|
|
||||||
mnuAdd.triggered.connect(lambda thePos : self._addWord(posCursor))
|
|
||||||
mnuContext.addAction(mnuAdd)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
mnuHead = QAction("No Suggestions", mnuContext)
|
mnuHead = QAction("%s No Suggestions" % nwUnicode.U_ENDASH, mnuContext)
|
||||||
mnuContext.addAction(mnuHead)
|
mnuContext.addAction(mnuHead)
|
||||||
|
|
||||||
|
mnuContext.addSeparator()
|
||||||
|
mnuAdd = QAction("Add Word to Dictionary", mnuContext)
|
||||||
|
mnuAdd.triggered.connect(lambda thePos : self._addWord(posCursor))
|
||||||
|
mnuContext.addAction(mnuAdd)
|
||||||
|
|
||||||
# Open the context menu
|
# Open the context menu
|
||||||
mnuContext.exec_(self.viewport().mapToGlobal(thePos))
|
mnuContext.exec_(self.viewport().mapToGlobal(thePos))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user