Issue #1992: Escape ampersand in caption of menus and tabs, preventing underlined hotkey generation for names of session, database and tables

This commit is contained in:
Ansgar Becker
2024-10-12 15:31:58 +02:00
parent bc479591f0
commit 89560cc4a0
2 changed files with 12 additions and 2 deletions

View File

@ -424,6 +424,7 @@ type
function WebColorStrToColorDef(WebColor: string; Default: TColor): TColor;
function UserAgent(OwnerComponent: TComponent): String;
function CodeIndent(Steps: Integer=1): String;
function EscapeHotkeyPrefix(Text: String): String;
var
AppSettings: TAppSettings;
@ -3011,6 +3012,13 @@ begin
end;
function EscapeHotkeyPrefix(Text: String): String;
begin
// Issue #1992: Escape ampersand in caption of menus and tabs, preventing underlined hotkey generation
Result := StringReplace(Text, Vcl.Menus.cHotkeyPrefix, Vcl.Menus.cHotkeyPrefix + Vcl.Menus.cHotkeyPrefix, [rfReplaceAll]);
end;
{ Get SID of current Windows user, probably useful in the future
function GetCurrentUserSID: string;
type