mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 05:56:02 +02:00
TAChart: Fix range check using datapoint tool on a chart without series
git-svn-id: trunk@37418 -
This commit is contained in:
parent
a9097788d4
commit
71d05cc6c6
@ -228,7 +228,7 @@ type
|
||||
constructor Init;
|
||||
public
|
||||
property AllSet: Boolean read FAllSet write SetAllSet;
|
||||
function AsBooleans(AMax: Integer): TBooleanDynArray;
|
||||
function AsBooleans(ACount: Integer): TBooleanDynArray;
|
||||
property AsString: String read GetAsString write SetAsString;
|
||||
property IsSet[AIndex: Integer]: Boolean read GetIsSet write SetIsSet;
|
||||
end;
|
||||
@ -773,18 +773,18 @@ end;
|
||||
|
||||
{ TPublishedIntegerSet }
|
||||
|
||||
function TPublishedIntegerSet.AsBooleans(AMax: Integer): TBooleanDynArray;
|
||||
function TPublishedIntegerSet.AsBooleans(ACount: Integer): TBooleanDynArray;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
SetLength(Result, AMax);
|
||||
if AllSet then begin
|
||||
FillChar(Result[0], Length(Result), true);
|
||||
exit;
|
||||
end;
|
||||
for i in FData do
|
||||
if InRange(i, 0, High(Result)) then
|
||||
Result[i] := true;
|
||||
SetLength(Result, ACount);
|
||||
if ACount = 0 then exit;
|
||||
if AllSet then
|
||||
FillChar(Result[0], Length(Result), true)
|
||||
else
|
||||
for i in FData do
|
||||
if InRange(i, 0, High(Result)) then
|
||||
Result[i] := true;
|
||||
end;
|
||||
|
||||
function TPublishedIntegerSet.GetAsString: String;
|
||||
|
Loading…
Reference in New Issue
Block a user