mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-04 17:59:33 +01: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.nMin := 0;
|
||||||
ScrollInfo.nTrackPos := 0;
|
ScrollInfo.nTrackPos := 0;
|
||||||
ScrollInfo.nMax := ATopMax+ClientHeight-1;
|
ScrollInfo.nMax := ATopMax+ClientHeight-1;
|
||||||
ScrollInfo.nPage := ClientHeight-1;
|
if ClientHeight < 2 then
|
||||||
if ScrollInfo.nPage<1 then ScrollInfo.nPage:=1;
|
ScrollInfo.nPage := 1
|
||||||
if TopY > ATopMax then TopY:=ATopMax;
|
else
|
||||||
|
ScrollInfo.nPage := ClientHeight-1;
|
||||||
|
if TopY > ATopMax then
|
||||||
|
TopY := ATopMax;
|
||||||
ScrollInfo.nPos := TopY;
|
ScrollInfo.nPos := TopY;
|
||||||
ShowScrollBar(Handle, SB_VERT, True);
|
ShowScrollBar(Handle, SB_VERT, True);
|
||||||
SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
|
SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user