Fix focus on translation textedit

Julien LepillerSat Oct 13 10:50:52+0200 2018

54ded12

Fix focus on translation textedit

offlate/window.py

8686
        self.treeWidget.setColumnCount(2)
8787
        self.msgid = QTextEdit()
8888
        self.msgid.setReadOnly(True)
89-
        self.msgstr = QTextEdit()
89+
        self.msgstr = SpellCheckEdit(self.project.lang)
9090
        self.filechooser = QComboBox()
9191
        for project in list(self.content.keys()):
9292
            self.filechooser.addItem(project)

146146
    def selectItem(self, current, old):
147147
        if current == None:
148148
            return
149+
        if self.msgstr.__class__.__name__ == "SpellCheckEdit":
150+
            self.msgstr.clearFocus()
151+
        else:
152+
            self.msgstr.currentWidget.clearFocus()
149153
        data = current.data(0, Qt.UserRole)
150154
        self.hbox.removeWidget(self.msgid)
151155
        self.hbox.removeItem(self.buttons)