TAChart: Do not notify from TListChartSource.SetXValue and SetYValue if the value did not actually change.

git-svn-id: trunk@38779 -
This commit is contained in:
ask 2012-09-21 10:51:46 +00:00
parent 12a20ff9fa
commit 88ff18a61a

View File

@ -577,9 +577,10 @@ var
begin
oldX := Item[AIndex]^.X;
Result := AIndex;
if oldX = AValue then exit;
Item[AIndex]^.X := AValue;
UpdateExtent;
Result := AIndex;
if Sorted then begin
if IsNan(AValue) then
raise EChartError.Create('X = NaN in a sorted source');
@ -649,6 +650,7 @@ var
begin
oldY := Item[AIndex]^.Y;
if oldY = AValue then exit;
Item[AIndex]^.Y := AValue;
if FValuesTotalIsValid then
FValuesTotal += NumberOr(AValue) - NumberOr(oldY);