mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-06 14:07:32 +00:00
Merge pull request #7654 from keymanapp/fix/developer/6928-state-change-for-touch-layout
fix(developer): handle edge cases for app sources
This commit is contained in:
commit
8003bf60bd
2 changed files with 7 additions and 3 deletions
|
|
@ -75,7 +75,11 @@ var
|
|||
begin
|
||||
T := FSources.LockList;
|
||||
try
|
||||
Assert(T.Count = 0, 'TAppSourceHttpResponder.Sources should be empty at destruction');
|
||||
// Note: Unlike regular functions, Assert has short-circuit evaluation
|
||||
// intrinsics on the first param which makes it safe to dereference T[0] in
|
||||
// the second parameter.
|
||||
Assert(T.Count = 0, 'TAppSourceHttpResponder.Sources should be empty at destruction '+
|
||||
'(T.Count='+IntToStr(T.Count)+', T[0].Filename='+T[0].Filename+')');
|
||||
finally
|
||||
FSources.UnlockList;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ type
|
|||
procedure UpdateCharacterMap(code: string); // I4046
|
||||
function GetFontInfo(Index: TKeyboardFont): TKeyboardFontInfo; // I4057
|
||||
procedure SetFontInfo(Index: TKeyboardFont; const Value: TKeyboardFontInfo); // I4057
|
||||
|
||||
|
||||
procedure cefCommand(Sender: TObject; const command: string; params: TStringList);
|
||||
procedure cefLoadEnd(Sender: TObject);
|
||||
procedure RegisterSource;
|
||||
|
|
@ -393,7 +393,7 @@ begin
|
|||
|
||||
finally
|
||||
RegisterSource;
|
||||
if FState <> '' then
|
||||
if (FFileName <> '') and (FState <> '') then
|
||||
modWebHttpServer.AppSource.RegisterSource(FFilename + '#state', FState, True);
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue