Fix focus on translation textedit
offlate/window.py
86 | 86 | self.treeWidget.setColumnCount(2) | |
87 | 87 | self.msgid = QTextEdit() | |
88 | 88 | self.msgid.setReadOnly(True) | |
89 | - | self.msgstr = QTextEdit() | |
89 | + | self.msgstr = SpellCheckEdit(self.project.lang) | |
90 | 90 | self.filechooser = QComboBox() | |
91 | 91 | for project in list(self.content.keys()): | |
92 | 92 | self.filechooser.addItem(project) | |
… | |||
146 | 146 | def selectItem(self, current, old): | |
147 | 147 | if current == None: | |
148 | 148 | return | |
149 | + | if self.msgstr.__class__.__name__ == "SpellCheckEdit": | |
150 | + | self.msgstr.clearFocus() | |
151 | + | else: | |
152 | + | self.msgstr.currentWidget.clearFocus() | |
149 | 153 | data = current.data(0, Qt.UserRole) | |
150 | 154 | self.hbox.removeWidget(self.msgid) | |
151 | 155 | self.hbox.removeItem(self.buttons) |