Prefer VCL function StripHotkey() over StringReplace

This commit is contained in:
Ansgar Becker
2010-05-30 23:19:23 +00:00
parent 00cf4d95cc
commit 84c638f0de
3 changed files with 14 additions and 18 deletions

View File

@@ -1876,8 +1876,7 @@ begin
Node := listColumns.GetNextSelected(Node);
end;
if Item.Parent = menuCreateIndex then begin
// Remove auto hotkeys
NewType := StringReplace(Item.Caption, '&', '', [rfReplaceAll]);
NewType := StripHotkey(Item.Caption);
// Avoid creating a second key with the same columns
for i:=0 to FKeys.Count-1 do begin
TblKey := FKeys[i];