mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 06:38:06 +02:00
ObjectInspector: prevent range check error in some rare situations.
git-svn-id: trunk@40905 -
This commit is contained in:
parent
7865022093
commit
c256dea046
@ -985,9 +985,12 @@ begin
|
||||
ScrollInfo.nMin := 0;
|
||||
ScrollInfo.nTrackPos := 0;
|
||||
ScrollInfo.nMax := ATopMax+ClientHeight-1;
|
||||
ScrollInfo.nPage := ClientHeight-1;
|
||||
if ScrollInfo.nPage<1 then ScrollInfo.nPage:=1;
|
||||
if TopY > ATopMax then TopY:=ATopMax;
|
||||
if ClientHeight < 2 then
|
||||
ScrollInfo.nPage := 1
|
||||
else
|
||||
ScrollInfo.nPage := ClientHeight-1;
|
||||
if TopY > ATopMax then
|
||||
TopY := ATopMax;
|
||||
ScrollInfo.nPos := TopY;
|
||||
ShowScrollBar(Handle, SB_VERT, True);
|
||||
SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
|
||||
|
Loading…
Reference in New Issue
Block a user