mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:59:14 +02:00
TAChart: Auto-hide axis if exception is raised while drawing it
git-svn-id: trunk@32027 -
This commit is contained in:
parent
afcfb37496
commit
b001e5e50e
@ -836,8 +836,13 @@ begin
|
|||||||
while AIndex < FZOrder.Count do
|
while AIndex < FZOrder.Count do
|
||||||
with TChartAxis(FZOrder[AIndex]) do begin
|
with TChartAxis(FZOrder[AIndex]) do begin
|
||||||
if ACurrentZ < ZPosition then break;
|
if ACurrentZ < ZPosition then break;
|
||||||
|
try
|
||||||
Draw;
|
Draw;
|
||||||
DrawTitle(FCenterPoint, FGroups[FGroupIndex].FTitleSize);
|
DrawTitle(FCenterPoint, FGroups[FGroupIndex].FTitleSize);
|
||||||
|
except
|
||||||
|
Visible := false;
|
||||||
|
raise;
|
||||||
|
end;
|
||||||
AIndex += 1;
|
AIndex += 1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -899,7 +904,12 @@ begin
|
|||||||
g^.FTitleSize := 0;
|
g^.FTitleSize := 0;
|
||||||
for j := 0 to g^.FCount - 1 do begin
|
for j := 0 to g^.FCount - 1 do begin
|
||||||
axis := TChartAxis(FGroupOrder[ai]);
|
axis := TChartAxis(FGroupOrder[ai]);
|
||||||
|
try
|
||||||
axis.Measure(AExtent, g^);
|
axis.Measure(AExtent, g^);
|
||||||
|
except
|
||||||
|
axis.Visible := false;
|
||||||
|
raise;
|
||||||
|
end;
|
||||||
ai += 1;
|
ai += 1;
|
||||||
end;
|
end;
|
||||||
// Axises of the same group should have the same Alignment and ZPosition.
|
// Axises of the same group should have the same Alignment and ZPosition.
|
||||||
|
Loading…
Reference in New Issue
Block a user