From c1e3bb9c8271684d1b92b37868438380b62ccd92 Mon Sep 17 00:00:00 2001 From: Ricky Date: Sun, 7 Aug 2016 04:31:43 -0700 Subject: [PATCH] Fixed context menu not appearing when no words were mispelled. --- qweechat/inputlinespell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qweechat/inputlinespell.py b/qweechat/inputlinespell.py index 25ca311..0b05bc2 100644 --- a/qweechat/inputlinespell.py +++ b/qweechat/inputlinespell.py @@ -156,13 +156,13 @@ class InputLineSpell(QtGui.QTextEdit): # Check if the selected word is misspelled and offer spelling # suggestions if it is. if enchant and self.spelldict: + top_action = popup_menu.actions()[0] if self.textCursor().hasSelection(): text = unicode(self.textCursor().selectedText()) if not self.spelldict.check(text): suggestions = self.spelldict.suggest(text) if len(suggestions) != 0: popup_menu.insertSeparator(popup_menu.actions()[0]) - top_action = popup_menu.actions()[0] for suggest in suggestions: self._menu_action(suggest, popup_menu, self.correctWord, after=top_action)