TAChart: More changes related to issue #40780. Patch by raspberryrabbit.

(cherry picked from commit e5c820b1d3)
This commit is contained in:
wp_xyz 2024-02-18 11:34:16 +01:00
parent 9f64bc4fc7
commit 8fb29f121e
2 changed files with 5 additions and 5 deletions

View File

@ -280,11 +280,11 @@ begin
if AMode in [dpmSnap, dpmLock] then begin
FindNearestPoint(APoint);
ADest.GraphPos := FNearestGraphPoint;
ADest.FIndex := PointIndex;
ADest.Index := PointIndex;
if not SameTransformations(FSeries, AOtherEndSeries) then
FSeries := nil;
end;
ADest.FSeries := FSeries;
ADest.Series := FSeries;
if FSeries = nil then
ADest.GraphPos := FChart.ImageToGraph(APoint);
Result := (FSeries <> nil) or (AMode <> dpmLock);
@ -326,7 +326,7 @@ begin
if IsActive then exit;
if dpdoPermanent in Options then
DoHide(GetCurrentDrawer);
PointStart.FSeries := nil;
PointStart.Series := nil;
if FindRef(APoint, DataPointModeStart, PointStart, nil) then
Activate;
PointEnd.Assign(PointStart);

View File

@ -409,8 +409,8 @@ type
procedure Assign(ASource: TPointRef);
function AxisPos(ADefaultSeries: TBasicChartSeries = nil): TDoublePoint;
property GraphPos: TDoublePoint read FGraphPos write SetGraphPos;
property Index: Integer read FIndex;
property Series: TBasicChartSeries read FSeries;
property Index: Integer read FIndex write FIndex;
property Series: TBasicChartSeries read FSeries write FSeries;
end;
strict private