From 2f11cbca88be0431e470d9d259a70cfe49676604 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 5 Sep 2009 09:50:02 +0000 Subject: [PATCH] Table editor: When creating a new index by using the columns context menu "Create index", use the concatenated column names as index name, instead of "Index 123". --- source/table_editor.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/table_editor.pas b/source/table_editor.pas index 61f5c49c..c53504dc 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -1969,7 +1969,6 @@ begin Item := (Sender as TMenuItem); NewParts := GetVTCaptions(listColumns, True, 1); if Item.Parent = menuCreateIndex then begin - NewName := 'Index '+IntToStr(Indexes.Count+1); // Remove auto hotkeys NewType := StringReplace(Item.Caption, '&', '', [rfReplaceAll]); // Avoid creating a second key with the same columns @@ -1985,6 +1984,7 @@ begin end; end; NewParts.OnChange := IndexesChange; + NewName := ImplodeStr('_', NewParts); Indexes.AddObject(NewName+REGDELIM+NewType, NewParts); PageControlMain.ActivePage := tabIndexes; treeIndexes.Repaint;