mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 12:00:29 +02:00
Merged revision(s) 49301 #41459427dc, 49512 #3768a9fd84 from trunk:
LCL: TCustomMaskEdit, do not set selection if control isn't focused. issue #17942 ........ LCL: fixed TMaskEdit left arrow does not move cursor. issue #28385 ........ git-svn-id: branches/fixes_1_4@49515 -
This commit is contained in:
parent
d028a23622
commit
36080c86e4
@ -753,7 +753,7 @@ begin
|
||||
begin
|
||||
if FCursorPos < 0 then FCursorPos := 0
|
||||
else if FCursorPos > FMaskLength then FCursorPos := FMaskLength;
|
||||
if FCursorPos + 1 > FMaskLength then
|
||||
if (FCursorPos + 1 > FMaskLength) or not Focused then
|
||||
SetSel(FCursorPos, FCursorPos)
|
||||
else
|
||||
SetSel(FCursorPos, FCursorPos + 1);
|
||||
@ -777,8 +777,11 @@ end;
|
||||
procedure TCustomMaskEdit.SelectPrevChar;
|
||||
var
|
||||
P: LongInt;
|
||||
AStart: Integer;
|
||||
AStop: Integer;
|
||||
begin
|
||||
if FCursorPos = 0 then Exit;
|
||||
GetSel(AStart, AStop);
|
||||
if (FCursorPos = 0) and (AStop - AStart <= 1) then Exit;
|
||||
P := FCursorPos;
|
||||
Dec(FCursorPos);
|
||||
While (FCursorPos > 0) and IsLiteral(FMask[FCursorPos + 1]) do
|
||||
|
Loading…
Reference in New Issue
Block a user