mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 22:56:46 +02:00
LCL, fix SelStart for gtk2 that cause typing in wrong order in stringgrid
git-svn-id: trunk@17788 -
This commit is contained in:
parent
226434bc52
commit
d0c213de66
@ -917,7 +917,11 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
Entry := PGtkEntry(ACustomEdit.Handle);
|
Entry := PGtkEntry(ACustomEdit.Handle);
|
||||||
if GetSelStart(ACustomEdit) = NewStart then exit;
|
if GetSelStart(ACustomEdit) = NewStart then exit;
|
||||||
NewPos := Min(NewStart, Entry^.text_max_length);
|
|
||||||
|
if Entry^.text_max_length>0 then
|
||||||
|
NewPos := Min(NewStart, Entry^.text_max_length)
|
||||||
|
else
|
||||||
|
NewPos := Min(NewStart, Entry^.text_length);
|
||||||
gtk_entry_set_position(Entry, NewPos);
|
gtk_entry_set_position(Entry, NewPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user