mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-27 21:57:13 +01:00
TAChart: Fix chart redrawing after manual Invalidate call
git-svn-id: trunk@25004 -
This commit is contained in:
parent
97d1dbe77d
commit
deb60ea55e
@ -376,8 +376,6 @@ begin
|
|||||||
Color := clBtnFace;
|
Color := clBtnFace;
|
||||||
FBackColor := clBtnFace;
|
FBackColor := clBtnFace;
|
||||||
|
|
||||||
FCurrentExtent := EmptyDoubleRect;
|
|
||||||
|
|
||||||
FIsZoomed := false;
|
FIsZoomed := false;
|
||||||
|
|
||||||
FGraphBrush := TBrush.Create;
|
FGraphBrush := TBrush.Create;
|
||||||
@ -470,7 +468,7 @@ begin
|
|||||||
|
|
||||||
if not FIsZoomed then
|
if not FIsZoomed then
|
||||||
UpdateExtent;
|
UpdateExtent;
|
||||||
FLogicalExtent := FCurrentExtent;
|
FCurrentExtent := FLogicalExtent;
|
||||||
DrawTitleFoot(ACanvas);
|
DrawTitleFoot(ACanvas);
|
||||||
PrepareLegend(ACanvas, legendItems, legendRect);
|
PrepareLegend(ACanvas, legendItems, legendRect);
|
||||||
try
|
try
|
||||||
@ -915,7 +913,6 @@ begin
|
|||||||
HideReticule;
|
HideReticule;
|
||||||
FLogicalExtent := AValue;
|
FLogicalExtent := AValue;
|
||||||
FIsZoomed := true;
|
FIsZoomed := true;
|
||||||
FCurrentExtent := FLogicalExtent;
|
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1044,20 +1041,20 @@ var
|
|||||||
begin
|
begin
|
||||||
Extent.CheckBoundsOrder;
|
Extent.CheckBoundsOrder;
|
||||||
|
|
||||||
FCurrentExtent := EmptyExtent;
|
FLogicalExtent := EmptyExtent;
|
||||||
for i := 0 to SeriesCount - 1 do begin
|
for i := 0 to SeriesCount - 1 do begin
|
||||||
s := Series[i];
|
s := Series[i];
|
||||||
if not s.Active then continue;
|
if not s.Active then continue;
|
||||||
seriesBounds := EmptyExtent;
|
seriesBounds := EmptyExtent;
|
||||||
s.GetGraphBounds(seriesBounds);
|
s.GetGraphBounds(seriesBounds);
|
||||||
with FCurrentExtent do begin
|
with FLogicalExtent do begin
|
||||||
a.X := Min(a.X, seriesBounds.a.X);
|
a.X := Min(a.X, seriesBounds.a.X);
|
||||||
b.X := Max(b.X, seriesBounds.b.X);
|
b.X := Max(b.X, seriesBounds.b.X);
|
||||||
a.Y := Min(a.Y, seriesBounds.a.Y);
|
a.Y := Min(a.Y, seriesBounds.a.Y);
|
||||||
b.Y := Max(b.Y, seriesBounds.b.Y);
|
b.Y := Max(b.Y, seriesBounds.b.Y);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
with FCurrentExtent, Extent do begin
|
with FLogicalExtent, Extent do begin
|
||||||
SetBounds(a.X, b.X, XMin, XMax, UseXMin, UseXMax);
|
SetBounds(a.X, b.X, XMin, XMax, UseXMin, UseXMax);
|
||||||
SetBounds(a.Y, b.Y, YMin, YMax, UseYMin, UseYMax);
|
SetBounds(a.Y, b.Y, YMin, YMax, UseYMin, UseYMax);
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user