fix(developer): insert from charmap into touch editor

Double-click to insert a character from char map into the touch layout
editor would not work reliably after focus changes.

Fixes #2702.
This commit is contained in:
Marc Durdin 2020-02-26 16:45:01 +07:00
parent 5466d82aac
commit dfaf93a7b7
2 changed files with 12 additions and 1 deletions

View file

@ -763,6 +763,9 @@ end;
procedure TfrmKeymanWizard.FocusTabTouchLayout; // I3885
begin
if pagesTouchLayout.ActivePage = pageTouchLayoutDesign
then DoFocus(frameTouchLayout)
else DoFocus(frameTouchLayoutSource);
end;
{-----------------------------------------------------------------------------}
@ -3172,7 +3175,9 @@ begin
begin
frameTouchLayoutSource.EditorText := frameTouchLayout.SaveToString;
DoFocus(frameTouchLayoutSource);
end;
end
else
DoFocus(frameTouchLayout);
FLoading := False;
end;

View file

@ -115,6 +115,7 @@ type
public
{ Public declarations }
procedure SetFocus; override;
procedure SetupCharMapDrop;
function Load(const AFilename: string; ALoadFromTemplate, ALoadFromString: Boolean): Boolean;
procedure Save(const AFilename: string);
@ -608,6 +609,11 @@ begin
cef.cef.SelectAll;
end;
procedure TframeTouchLayoutBuilder.SetFocus;
begin
cef.SetFocus;
end;
procedure TframeTouchLayoutBuilder.SetFontInfo(Index: TKeyboardFont; const Value: TKeyboardFontInfo); // I4057
var
s: string;