mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 11:18:22 +02:00
Merged revision(s) 57113 #f00551aab4 from trunk:
TAChart: Fix crash if multi-valued lineseries is displayed in legend using styles. ........ git-svn-id: branches/fixes_1_8@57212 -
This commit is contained in:
parent
735cd248e4
commit
b54c67b9b1
@ -565,6 +565,7 @@ end;
|
||||
|
||||
procedure TLineSeries.GetLegendItems(AItems: TChartLegendItems);
|
||||
var
|
||||
lb: TBrush;
|
||||
lp: TPen;
|
||||
p: TSeriesPointer;
|
||||
i: Integer;
|
||||
@ -589,14 +590,16 @@ begin
|
||||
AItems.Add(li);
|
||||
end;
|
||||
lmStyle:
|
||||
if Styles <> nil then
|
||||
if Styles <> nil then begin
|
||||
if Assigned(p) then lb := p.Brush else lb := nil;
|
||||
for s in Styles.Styles do
|
||||
AItems.Add(TLegendItemLinePointer.CreateWithBrush(
|
||||
IfThen((lp <> nil) and s.UsePen, s.Pen, lp) as TPen,
|
||||
IfThen(s.UseBrush, s.Brush, p.Brush) as TBrush,
|
||||
IfThen(s.UseBrush, s.Brush, lb) as TBrush,
|
||||
p,
|
||||
LegendTextStyle(s)
|
||||
));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user