From 7a8477c57f7dc726b4851982f22ee26556d6b2e7 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 7 Dec 2009 20:00:35 +0000 Subject: [PATCH] VirtualStringTree.InsertNode internally calls .DoCancelEdit, which is not what we want when the user clicks the "Add column" button while editing another column. Instead, explicitly call .EndEditNode before .InsertNode. Fixes issue #1508. --- source/table_editor.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/table_editor.pas b/source/table_editor.pas index 7b3e56d0..5671c3f1 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -761,6 +761,8 @@ var idx: Integer; begin // Add new column after selected one + if listColumns.IsEditing then + listColumns.EndEditNode; fn := listColumns.FocusedNode; NewCol := TTableColumn.Create; if Assigned(fn) then begin