mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 14:29:33 +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);
|
procedure TChartAxis.StyleChanged(ASender: TObject);
|
||||||
begin
|
begin
|
||||||
Unused(ASender);
|
with Collection.Owner as TCustomChart do begin
|
||||||
(Collection.Owner as TCustomChart).Invalidate;
|
// Transformation change could have invalidated the current extent,
|
||||||
|
// so revert to full extent for now.
|
||||||
|
if ASender is TAxisTransform then
|
||||||
|
ZoomFull;
|
||||||
|
Invalidate;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
@ -236,7 +236,7 @@ type
|
|||||||
procedure SaveToBitmapFile(const AFileName: String); inline;
|
procedure SaveToBitmapFile(const AFileName: String); inline;
|
||||||
procedure SaveToFile(AClass: TRasterImageClass; const AFileName: String);
|
procedure SaveToFile(AClass: TRasterImageClass; const AFileName: String);
|
||||||
function SaveToImage(AClass: TRasterImageClass): TRasterImage;
|
function SaveToImage(AClass: TRasterImageClass): TRasterImage;
|
||||||
procedure ZoomFull;
|
procedure ZoomFull; override;
|
||||||
public // Coordinate conversion
|
public // Coordinate conversion
|
||||||
function GraphToImage(const AGraphPoint: TDoublePoint): TPoint;
|
function GraphToImage(const AGraphPoint: TDoublePoint): TPoint;
|
||||||
function ImageToGraph(const APoint: TPoint): TDoublePoint;
|
function ImageToGraph(const APoint: TPoint): TDoublePoint;
|
||||||
|
@ -41,7 +41,10 @@ const
|
|||||||
DEF_TITLE_DISTANCE = 4;
|
DEF_TITLE_DISTANCE = 4;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCustomChart = class(TCustomControl);
|
TCustomChart = class(TCustomControl)
|
||||||
|
public
|
||||||
|
procedure ZoomFull; virtual; abstract;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TChartPen }
|
{ TChartPen }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user