TAChart: Always reset the extent after EndUpdate in TUserDefinedChartSource

git-svn-id: trunk@30379 -
This commit is contained in:
ask 2011-04-19 07:28:54 +00:00
parent 2ec56385d6
commit 48e27c17da
2 changed files with 10 additions and 1 deletions

View File

@ -65,7 +65,7 @@ type
procedure AfterDraw; virtual;
procedure BeforeDraw; virtual;
procedure BeginUpdate;
procedure EndUpdate;
procedure EndUpdate; virtual;
function IsUpdating: Boolean; inline;
public
class procedure CheckFormat(const AFormat: String);

View File

@ -187,6 +187,7 @@ type
function GetItem(AIndex: Integer): PChartDataItem; override;
procedure SetYCount(AValue: Cardinal); override;
public
procedure EndUpdate; override;
function IsSorted: Boolean; override;
procedure Reset; inline;
published
@ -948,6 +949,14 @@ end;
{ TUserDefinedChartSource }
procedure TUserDefinedChartSource.EndUpdate;
begin
// There is no way to detect if the extent changed --
// so call Reset to be a bit safer, but a bit slower.
Reset;
inherited EndUpdate;
end;
function TUserDefinedChartSource.GetCount: Integer;
begin
Result := FPointsNumber;