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.

This commit is contained in:
Ansgar Becker
2009-12-07 20:00:35 +00:00
parent ce1da97120
commit 7a8477c57f

View File

@ -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