mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 14:39:09 +02:00
TAChart: Do not invalidate chart on mouseclick if zooming was not changed
git-svn-id: trunk@23468 -
This commit is contained in:
parent
05bb84fffb
commit
1e56a54ecc
@ -912,6 +912,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure TChart.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
oldIsZoomed: Boolean;
|
||||||
begin
|
begin
|
||||||
if not FIsMouseDown then begin
|
if not FIsMouseDown then begin
|
||||||
inherited;
|
inherited;
|
||||||
@ -924,19 +926,20 @@ begin
|
|||||||
|
|
||||||
FIsMouseDown := false;
|
FIsMouseDown := false;
|
||||||
|
|
||||||
with FSelectionRect do begin
|
oldIsZoomed := FIsZoomed;
|
||||||
|
with FSelectionRect do
|
||||||
FIsZoomed := (Left < Right) and (Top < Bottom);
|
FIsZoomed := (Left < Right) and (Top < Bottom);
|
||||||
if FIsZoomed then
|
if FIsZoomed then
|
||||||
with FZoomExtent do begin
|
with FZoomExtent do begin
|
||||||
a := ImageToGraph(TopLeft);
|
a := ImageToGraph(FSelectionRect.TopLeft);
|
||||||
b := ImageToGraph(BottomRight);
|
b := ImageToGraph(FSelectionRect.BottomRight);
|
||||||
if a.X > b.X then
|
if a.X > b.X then
|
||||||
Exchange(a.X, b.X);
|
Exchange(a.X, b.X);
|
||||||
if a.Y > b.Y then
|
if a.Y > b.Y then
|
||||||
Exchange(a.Y, b.Y);
|
Exchange(a.Y, b.Y);
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
|
if FIsZoomed or oldIsZoomed then
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user