From 7c6a70232a15a6a5d5c04a8cfdca34856265ec15 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 13 Oct 2008 22:05:59 +0000 Subject: [PATCH] Fix bug #799 default value '' of a field changed to '''' when field name changed --- source/fieldeditor.pas | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/fieldeditor.pas b/source/fieldeditor.pas index b5f08511..e873e72d 100644 --- a/source/fieldeditor.pas +++ b/source/fieldeditor.pas @@ -174,6 +174,7 @@ var i, j : Integer; ListColumns : TVirtualStringTree; NodeData : PVTreeData; + origDefault : WideString; begin // Initiate "Position"-combobox @@ -234,15 +235,16 @@ begin EditFieldname.Text := FFieldName; EditLength.Text := getEnumValues( NodeData.Captions[1] ); editDefault.Text := ''; - if NodeData.Captions[3] = '' then + origDefault := NodeData.Captions[3]; + if origDefault = '' then comboDefault.ItemIndex := DEFAULT_NO - else if NodeData.Captions[3] = 'NULL' then + else if origDefault = 'NULL' then comboDefault.ItemIndex := DEFAULT_NULL - else if NodeData.Captions[3] = 'CURRENT_TIMESTAMP' then + else if origDefault = 'CURRENT_TIMESTAMP' then comboDefault.ItemIndex := DEFAULT_CURTS else begin comboDefault.ItemIndex := DEFAULT_CUSTOM; - EditDefault.Text := WideDequotedStr(NodeData.Captions[3], ''''); + EditDefault.Text := Copy(origDefault, 2, Length(origDefault)-2); end; EditComment.Text := NodeData.Captions[5];