mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
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".
This commit is contained in:
@ -1969,7 +1969,6 @@ begin
|
|||||||
Item := (Sender as TMenuItem);
|
Item := (Sender as TMenuItem);
|
||||||
NewParts := GetVTCaptions(listColumns, True, 1);
|
NewParts := GetVTCaptions(listColumns, True, 1);
|
||||||
if Item.Parent = menuCreateIndex then begin
|
if Item.Parent = menuCreateIndex then begin
|
||||||
NewName := 'Index '+IntToStr(Indexes.Count+1);
|
|
||||||
// Remove auto hotkeys
|
// Remove auto hotkeys
|
||||||
NewType := StringReplace(Item.Caption, '&', '', [rfReplaceAll]);
|
NewType := StringReplace(Item.Caption, '&', '', [rfReplaceAll]);
|
||||||
// Avoid creating a second key with the same columns
|
// Avoid creating a second key with the same columns
|
||||||
@ -1985,6 +1984,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
NewParts.OnChange := IndexesChange;
|
NewParts.OnChange := IndexesChange;
|
||||||
|
NewName := ImplodeStr('_', NewParts);
|
||||||
Indexes.AddObject(NewName+REGDELIM+NewType, NewParts);
|
Indexes.AddObject(NewName+REGDELIM+NewType, NewParts);
|
||||||
PageControlMain.ActivePage := tabIndexes;
|
PageControlMain.ActivePage := tabIndexes;
|
||||||
treeIndexes.Repaint;
|
treeIndexes.Repaint;
|
||||||
|
Reference in New Issue
Block a user