def _delayed_edit ( self, info ):
        """ Edits the current filter, and deletes it if the user cancels the
            edit.
        """
        ui = self.filter.edit( self.editor.model.get_filtered_item( 0 ) )
        if not ui.result:
            self.object_delete_changed( info )
        else:
            self._refresh_filters( info )

        # Allow deletion as long as there is more than 1 filter:
        if (not self.filter.template) and len( info.filter.factory.values ) > 1:
            info.delete.enabled = True

#-------------------------------------------------------------------------------
#  'TableEditorToolbar' class:
#-------------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/table_editor.py/TableFilterEditor._delayed_edit/original