From ac8542b9f9289dd604651fafda2ab323c65db18d Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 24 Sep 2025 21:38:09 +0200 Subject: [PATCH] Issue #2260: fix non-accepted pasted new text in collation drop-down --- source/grideditlinks.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/grideditlinks.pas b/source/grideditlinks.pas index 08afcede..b40b14d2 100644 --- a/source/grideditlinks.pas +++ b/source/grideditlinks.pas @@ -919,8 +919,12 @@ function TEnumEditorLink.EndEdit: Boolean; stdcall; var NewText: String; begin - if AllowCustomText and FAllowEdit and (not ItemMustExist) then - NewText := FCombo.Text + if AllowCustomText and FAllowEdit then begin + if (not ItemMustExist) or ValueList.Contains(FCombo.Text) then + NewText := FCombo.Text + else + NewText := ''; + end else if (ValueList.Count > 0) and (FCombo.ItemIndex > -1) then NewText := ValueList[FCombo.ItemIndex] else