def _mouse_release_on_text(self, event): if self._copy_format_mode == TextEditor.COPY_FORMAT: self._doc.copy_format(self._current_format) self._doc.change(self._view.text.textCursor()) self._view.text.viewport().setCursor(self._view.cursors["normal"]) self._copy_format_mode = TextEditor.NORMAL_MODE QTextEdit.mouseReleaseEvent(self._view.text, event)