mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 22:37:28 +02:00
TAChart: Fix SIGFPE after changing scale to logarithmic on zoomed-in chart
git-svn-id: trunk@25941 -
This commit is contained in:
parent
68caa0b7e3
commit
3fb76f8c86
@ -652,8 +652,13 @@ end;
|
||||
|
||||
procedure TChartAxis.StyleChanged(ASender: TObject);
|
||||
begin
|
||||
Unused(ASender);
|
||||
(Collection.Owner as TCustomChart).Invalidate;
|
||||
with Collection.Owner as TCustomChart do begin
|
||||
// Transformation change could have invalidated the current extent,
|
||||
// so revert to full extent for now.
|
||||
if ASender is TAxisTransform then
|
||||
ZoomFull;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
const
|
||||
|
@ -236,7 +236,7 @@ type
|
||||
procedure SaveToBitmapFile(const AFileName: String); inline;
|
||||
procedure SaveToFile(AClass: TRasterImageClass; const AFileName: String);
|
||||
function SaveToImage(AClass: TRasterImageClass): TRasterImage;
|
||||
procedure ZoomFull;
|
||||
procedure ZoomFull; override;
|
||||
public // Coordinate conversion
|
||||
function GraphToImage(const AGraphPoint: TDoublePoint): TPoint;
|
||||
function ImageToGraph(const APoint: TPoint): TDoublePoint;
|
||||
|
@ -41,7 +41,10 @@ const
|
||||
DEF_TITLE_DISTANCE = 4;
|
||||
|
||||
type
|
||||
TCustomChart = class(TCustomControl);
|
||||
TCustomChart = class(TCustomControl)
|
||||
public
|
||||
procedure ZoomFull; virtual; abstract;
|
||||
end;
|
||||
|
||||
{ TChartPen }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user