ui: Check occurrence when check for existing custom column

Add a check for occurrence in column_prefs_has_custom() to allow
"Apply as Column" if column already exists with occurrence set.
This commit is contained in:
Stig Bjørlykke 2023-01-16 12:34:30 +01:00
parent c8f8bc82a7
commit d851134d89
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ column_prefs_has_custom(const gchar *custom_field)
continue;
cfmt = (fmt_data *) clp->data;
if (cfmt->fmt == COL_CUSTOM && strcmp(custom_field, cfmt->custom_fields) == 0) {
if (cfmt->fmt == COL_CUSTOM && cfmt->custom_occurrence == 0 && strcmp(custom_field, cfmt->custom_fields) == 0) {
colnr = i;
break;
}