def resynch_editor(self): """ Resynchronizes the contents of the editor when the object trait changes externally to the editor. """ button = self._button if button is not None: label = self.factory.label if label == "": label = user_name_for(self.name) button.setText(label) button.setEnabled(isinstance(self.value, HasTraits))