code: def modelItemChanged(self, cti):
          
          if cti is not self.cti:
              logger.debug("Another config tree item has changed: {}. Closing editor for {}"
                           .format(cti, self.cti))
              self.delegate.closeEditor.emit(self, QtWidgets.QAbstractItemDelegate.NoHint) # CLOSES SELF!
          else:
              logger.debug("Cti of this editor has changed: {}".format(cti))
docs: Called when the an Config Tree Item (CTI) in the model has changed.
  
              If the CTI is a different one than the CTI that belongs to this editor, the editor
              is closed. This can happen if the user has checked a checkbox. Qt does not close other
              editors in the view in that case, so this is why we do it here.
  
              If the cti parameter is the CTI belonging to this editor, nothing is done. We don't
              close the editor because the user may want to continue editing.