mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 16:19:33 +02:00
Clean up procedure TScreen.EndTempCursor. Issue #40389.
This commit is contained in:
parent
4f8c825710
commit
ca9cb1a6e4
@ -438,14 +438,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TScreen.EndTempCursor(const aCursor: TCursor);
|
procedure TScreen.EndTempCursor(const aCursor: TCursor);
|
||||||
procedure _Delete(const _Index: Integer); // FPC 3.0.x doesn't support Delete() for arrays #36728
|
|
||||||
var
|
|
||||||
I: Integer;
|
|
||||||
begin
|
|
||||||
for I := _Index to High(FTempCursors)-1 do
|
|
||||||
FTempCursors[I] := FTempCursors[I+1];
|
|
||||||
SetLength(FTempCursors, Length(FTempCursors)-1);
|
|
||||||
end;
|
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
OldCursor: TCursor;
|
OldCursor: TCursor;
|
||||||
@ -455,7 +447,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if FTempCursors[I]=aCursor then
|
if FTempCursors[I]=aCursor then
|
||||||
begin
|
begin
|
||||||
_Delete(I);
|
Delete(FTempCursors,I,1);
|
||||||
if OldCursor<>RealCursor then
|
if OldCursor<>RealCursor then
|
||||||
WidgetSet.SetCursor(Cursors[RealCursor]);
|
WidgetSet.SetCursor(Cursors[RealCursor]);
|
||||||
Exit;
|
Exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user