Skip to content

Commit 42a061d

Browse files
committed
enhance: do not copy default type and value from previous column when adding columns to a table
Refs #2494
1 parent 2930be8 commit 42a061d

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
@@ -1143,8 +1143,8 @@ procedure TfrmTableEditor.btnAddColumnClick(Sender: TObject);
11431143
NewCol.DefaultType := cdtText;
11441144
NewCol.DefaultText := '0';
11451145
end else begin
1146-
NewCol.DefaultType := FocusedCol.DefaultType;
1147-
NewCol.DefaultText := FocusedCol.DefaultText;
1146+
NewCol.DefaultType := cdtNothing;
1147+
NewCol.DefaultText := '';
11481148
end;
11491149
NewCol.Collation := '';
11501150
end else begin
@@ -1155,9 +1155,9 @@ procedure TfrmTableEditor.btnAddColumnClick(Sender: TObject);
11551155
NewCol.AllowNull := True;
11561156
NewCol.DefaultType := cdtNothing;
11571157
NewCol.DefaultText := '';
1158-
NewCol.Comment := '';
1159-
NewCol.Collation := '';
11601158
end;
1159+
NewCol.Comment := '';
1160+
NewCol.Collation := '';
11611161
NewCol.Name := _('Column')+' '+IntToStr(idx+1);
11621162
FColumns.Insert(idx, NewCol);
11631163
NewNode := listColumns.InsertNode(fn, amInsertAfter, @NewCol);

0 commit comments

Comments
 (0)