mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-15 13:22:50 +02:00
TAChart: Do not redraw if LogicalExtent is re-assigned to the same value
git-svn-id: trunk@29927 -
This commit is contained in:
parent
4248b7497e
commit
ba7c0506c4
@ -66,6 +66,7 @@ operator *(const A, B: TPoint): TPoint; inline;
|
|||||||
operator *(const A, B: TDoublePoint): TDoublePoint; overload; inline;
|
operator *(const A, B: TDoublePoint): TDoublePoint; overload; inline;
|
||||||
operator /(const A, B: TDoublePoint): TDoublePoint; overload; inline;
|
operator /(const A, B: TDoublePoint): TDoublePoint; overload; inline;
|
||||||
operator = (const A, B: TDoublePoint): Boolean; overload; inline;
|
operator = (const A, B: TDoublePoint): Boolean; overload; inline;
|
||||||
|
operator = (const A, B: TDoubleRect): Boolean; overload; inline;
|
||||||
operator <= (const A, B: TDoublePoint): Boolean; overload; inline;
|
operator <= (const A, B: TDoublePoint): Boolean; overload; inline;
|
||||||
operator :=(const APoint: TPoint): TSize; inline;
|
operator :=(const APoint: TPoint): TSize; inline;
|
||||||
operator :=(const ASize: TSize): TPoint; inline;
|
operator :=(const ASize: TSize): TPoint; inline;
|
||||||
@ -435,6 +436,11 @@ begin
|
|||||||
Result := (A.X = B.X) and (A.Y = B.Y);
|
Result := (A.X = B.X) and (A.Y = B.Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
operator = (const A, B: TDoubleRect): Boolean;
|
||||||
|
begin
|
||||||
|
Result := (A.a = B.a) and (A.b = B.b);
|
||||||
|
end;
|
||||||
|
|
||||||
operator <= (const A, B: TDoublePoint): Boolean;
|
operator <= (const A, B: TDoublePoint): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (A.X <= B.X) and (A.Y <= B.Y);
|
Result := (A.X <= B.X) and (A.Y <= B.Y);
|
||||||
|
@ -325,7 +325,8 @@ type
|
|||||||
read FOnAfterDrawBackground write SetOnAfterDrawBackground;
|
read FOnAfterDrawBackground write SetOnAfterDrawBackground;
|
||||||
property OnAfterDrawBackWall: TChartAfterDrawEvent
|
property OnAfterDrawBackWall: TChartAfterDrawEvent
|
||||||
read FOnAfterDrawBackWall write SetOnAfterDrawBackWall;
|
read FOnAfterDrawBackWall write SetOnAfterDrawBackWall;
|
||||||
property OnBeforeDrawBackground: TChartBeforeDrawEvent read FOnBeforeDrawBackground write SetOnBeforeDrawBackground;
|
property OnBeforeDrawBackground: TChartBeforeDrawEvent
|
||||||
|
read FOnBeforeDrawBackground write SetOnBeforeDrawBackground;
|
||||||
property OnBeforeDrawBackWall: TChartBeforeDrawEvent
|
property OnBeforeDrawBackWall: TChartBeforeDrawEvent
|
||||||
read FOnBeforeDrawBackWall write SetOnBeforeDrawBackWall;
|
read FOnBeforeDrawBackWall write SetOnBeforeDrawBackWall;
|
||||||
property OnDrawReticule: TDrawReticuleEvent
|
property OnDrawReticule: TDrawReticuleEvent
|
||||||
@ -686,10 +687,7 @@ begin
|
|||||||
for i := 0 to SeriesCount - 1 do
|
for i := 0 to SeriesCount - 1 do
|
||||||
Series[i].AfterDraw;
|
Series[i].AfterDraw;
|
||||||
|
|
||||||
if
|
if FPrevLogicalExtent <> FLogicalExtent then begin
|
||||||
(FPrevLogicalExtent.a <> FLogicalExtent.a) or
|
|
||||||
(FPrevLogicalExtent.b <> FLogicalExtent.b)
|
|
||||||
then begin
|
|
||||||
FExtentBroadcaster.Broadcast(Self);
|
FExtentBroadcaster.Broadcast(Self);
|
||||||
if Assigned(OnExtentChanged) then
|
if Assigned(OnExtentChanged) then
|
||||||
OnExtentChanged(Self);
|
OnExtentChanged(Self);
|
||||||
@ -1119,6 +1117,7 @@ end;
|
|||||||
|
|
||||||
procedure TChart.SetLogicalExtent(const AValue: TDoubleRect);
|
procedure TChart.SetLogicalExtent(const AValue: TDoubleRect);
|
||||||
begin
|
begin
|
||||||
|
if FLogicalExtent = AValue then exit;
|
||||||
HideReticule;
|
HideReticule;
|
||||||
FLogicalExtent := AValue;
|
FLogicalExtent := AValue;
|
||||||
FIsZoomed := true;
|
FIsZoomed := true;
|
||||||
|
Loading…
Reference in New Issue
Block a user