View Issue Details

IDProjectCategoryView StatusLast Update
0025456PackagesTAChartpublic2014-01-18 00:30
Reporterwp Assigned ToMaxim Ganetsky  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi86OSWindows 
Product Version1.3 (SVN) 
Fixed in Version1.2.0 
Summary0025456: TAChart crashes when legend of a chart with PolarSeries is shown
DescriptionA chart with a PolarSeries crashes when the legend is activated (Chart.Legend.visible = true). The crash is due to calling the abstract method TPolarSeries.GetLegendItems. If occuring at design-time Lazarus may close leaving no time to save open work.
Steps To ReproduceOpen attached project in Lazarus. It contains a chart with a PolarSeries. In OI, set Chart1.Legend.Visible to true. Either Lazarus shuts down, or a message pops up saying that an abstract method has been called.
Additional InformationThe attached patch adds the missing implementation of TPolarSeries.GetLegendItems.
TagsNo tags attached.
Fixed in Revision43737
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

wp

2013-12-23 21:10

developer  

wp

2013-12-23 21:11

developer  

taradialseries.pas.patch (831 bytes)   
Index: taradialseries.pas
===================================================================
--- taradialseries.pas	(revision 43585)
+++ taradialseries.pas	(working copy)
@@ -123,6 +123,7 @@
     function GraphPoint(AIndex: Integer): TDoublePoint;
     procedure PrepareAngleCache;
   protected
+    procedure GetLegendItems(AItems: TChartLegendItems); override;
     procedure SourceChanged(ASender: TObject); override;
   public
     procedure Assign(ASource: TPersistent); override;
@@ -595,6 +596,11 @@
     ExpandRect(Result, GraphPoint(i));
 end;
 
+procedure TPolarSeries.GetLegendItems(AItems: TChartLegendItems);
+begin
+  AItems.Add(TLegendItemLine.Create(LinePen, LegendTextSingle));
+end;
+
 function TPolarSeries.GraphPoint(AIndex: Integer): TDoublePoint;
 begin
   with Source[AIndex]^, FAngleCache[AIndex] do
taradialseries.pas.patch (831 bytes)   

wp

2014-01-05 17:28

developer   ~0072228

Could somebody apply this patch? I'd like to have it fixed in 1.2

Maxim Ganetsky

2014-01-16 21:40

developer   ~0072495

Applied, thanks.

Scheduled for merging to fixes_1_2.

Please test and close if OK.

wp

2014-01-16 23:03

developer   ~0072498

Thanks.

Issue History

Date Modified Username Field Change
2013-12-23 21:10 wp New Issue
2013-12-23 21:10 wp Status new => assigned
2013-12-23 21:10 wp Assigned To => Alexander S. Klenin
2013-12-23 21:10 wp File Added: PolarSeries_Legend_Crash.zip
2013-12-23 21:11 wp File Added: taradialseries.pas.patch
2014-01-05 17:28 wp Note Added: 0072228
2014-01-16 21:40 Maxim Ganetsky Fixed in Revision => 43737
2014-01-16 21:40 Maxim Ganetsky LazTarget => -
2014-01-16 21:40 Maxim Ganetsky Note Added: 0072495
2014-01-16 21:40 Maxim Ganetsky Status assigned => resolved
2014-01-16 21:40 Maxim Ganetsky Fixed in Version => 1.4
2014-01-16 21:40 Maxim Ganetsky Resolution open => fixed
2014-01-16 21:40 Maxim Ganetsky Assigned To Alexander S. Klenin => Maxim Ganetsky
2014-01-16 22:43 Maxim Ganetsky Fixed in Version 1.4 => 1.2.0
2014-01-16 23:03 wp Note Added: 0072498
2014-01-18 00:30 Maxim Ganetsky Status resolved => closed