Skip to content

Commit c94b860

Browse files
committed
enhance: do not copy default type and value from previous column when adding columns to a table
Refs #2494
1 parent 2151b40 commit c94b860

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

source/table_editor.pas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,8 +1140,8 @@ procedure TfrmTableEditor.btnAddColumnClick(Sender: TObject);
11401140
NewCol.DefaultType := cdtText;
11411141
NewCol.DefaultText := '0';
11421142
end else begin
1143-
NewCol.DefaultType := FocusedCol.DefaultType;
1144-
NewCol.DefaultText := FocusedCol.DefaultText;
1143+
NewCol.DefaultType := cdtNothing;
1144+
NewCol.DefaultText := '';
11451145
end;
11461146
NewCol.Collation := '';
11471147
end else begin
@@ -1152,9 +1152,9 @@ procedure TfrmTableEditor.btnAddColumnClick(Sender: TObject);
11521152
NewCol.AllowNull := True;
11531153
NewCol.DefaultType := cdtNothing;
11541154
NewCol.DefaultText := '';
1155-
NewCol.Comment := '';
1156-
NewCol.Collation := '';
11571155
end;
1156+
NewCol.Comment := '';
1157+
NewCol.Collation := '';
11581158
NewCol.Name := _('Column')+' '+IntToStr(idx+1);
11591159
FColumns.Insert(idx, NewCol);
11601160
NewNode := listColumns.InsertNode(fn, amInsertAfter, @NewCol);

0 commit comments

Comments
 (0)