mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 02:40:36 +01:00
TAChart: Hide legend if exception happened while attempting to fill it
git-svn-id: trunk@39599 -
This commit is contained in:
parent
d85ae3b08e
commit
607dd7c75f
@ -58,7 +58,6 @@ type
|
||||
procedure SetAxisIndexX(AValue: TChartAxisIndex);
|
||||
procedure SetAxisIndexY(AValue: TChartAxisIndex);
|
||||
procedure SetLegend(AValue: TChartSeriesLegend);
|
||||
procedure SetShowInLegend(AValue: Boolean);
|
||||
|
||||
protected
|
||||
procedure AfterAdd; override;
|
||||
@ -67,6 +66,7 @@ type
|
||||
function GetShowInLegend: Boolean; override;
|
||||
procedure SetActive(AValue: Boolean); override;
|
||||
procedure SetDepth(AValue: TChartDistance); override;
|
||||
procedure SetShowInLegend(AValue: Boolean); override;
|
||||
procedure SetTitle(AValue: String); virtual;
|
||||
procedure SetTransparency(AValue: TChartTransparency); override;
|
||||
procedure SetZPosition(AValue: TChartDistance); override;
|
||||
|
||||
@ -58,6 +58,7 @@ type
|
||||
function GetShowInLegend: Boolean; virtual; abstract;
|
||||
procedure SetActive(AValue: Boolean); virtual; abstract;
|
||||
procedure SetDepth(AValue: TChartDistance); virtual; abstract;
|
||||
procedure SetShowInLegend(AValue: Boolean); virtual; abstract;
|
||||
procedure SetTransparency(AValue: TChartTransparency); virtual; abstract;
|
||||
procedure SetZPosition(AValue: TChartDistance); virtual; abstract;
|
||||
procedure UpdateMargins(ADrawer: IChartDrawer; var AMargins: TRect); virtual;
|
||||
@ -1006,7 +1007,12 @@ begin
|
||||
try
|
||||
for s in Series do
|
||||
if AIncludeHidden or (s.Active and s.GetShowInLegend) then
|
||||
s.GetLegendItemsBasic(Result);
|
||||
try
|
||||
s.GetLegendItemsBasic(Result);
|
||||
except
|
||||
s.SetShowInLegend(AIncludeHidden);
|
||||
raise;
|
||||
end;
|
||||
except
|
||||
FreeAndNil(Result);
|
||||
raise;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user