def _on_current_changed(self, index): if self._lock: return if index == self.count() - 1: from pyqode.core.dialogs import DlgPreferredEncodingsEditor if DlgPreferredEncodingsEditor.edit_encoding(self): self._refresh_items() else: self._current_encoding = self.itemData(index, QtCore.Qt.UserRole)
def _on_edit_requested(self): from pyqode.core.dialogs import DlgPreferredEncodingsEditor if DlgPreferredEncodingsEditor.edit_encoding(self): self._refresh()