mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 09:05:58 +02:00
TAChart: Fix crash in design mode when Undo is executed after deleting a series.
This commit is contained in:
parent
73d41e6636
commit
358a6955a0
@ -63,8 +63,9 @@ begin
|
|||||||
s := GetComponent(0) as TCustomChartSeries;
|
s := GetComponent(0) as TCustomChartSeries;
|
||||||
ch := s.ParentChart;
|
ch := s.ParentChart;
|
||||||
AProc('-1 None');
|
AProc('-1 None');
|
||||||
for i := 0 to ch.AxisList.Count - 1 do
|
if ch <> nil then
|
||||||
AProc(IntToStr(i) + ' ' + ch.AxisList[i].DisplayName);
|
for i := 0 to ch.AxisList.Count - 1 do
|
||||||
|
AProc(IntToStr(i) + ' ' + ch.AxisList[i].DisplayName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TAxisIndexPropertyEditor.OrdValueToVisualValue(
|
function TAxisIndexPropertyEditor.OrdValueToVisualValue(
|
||||||
@ -76,7 +77,7 @@ begin
|
|||||||
s := GetComponent(0) as TCustomChartSeries;
|
s := GetComponent(0) as TCustomChartSeries;
|
||||||
ch := s.ParentChart;
|
ch := s.ParentChart;
|
||||||
Result := IntToStr(AOrdValue) + ' ';
|
Result := IntToStr(AOrdValue) + ' ';
|
||||||
if InRange(AOrdValue, 0, ch.AxisList.Count - 1) then
|
if Assigned(ch) and InRange(AOrdValue, 0, ch.AxisList.Count - 1) then
|
||||||
Result += ch.AxisList[AOrdValue].DisplayName
|
Result += ch.AxisList[AOrdValue].DisplayName
|
||||||
else
|
else
|
||||||
Result += 'None';
|
Result += 'None';
|
||||||
|
Loading…
Reference in New Issue
Block a user