From 8d5111cf8a8881d331e4e24d02e7009c03543a24 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 10 Dec 2009 18:55:01 +0000 Subject: [PATCH] Fix flicker in update checker dialog while downloading a build file. --- source/updatecheck.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/updatecheck.pas b/source/updatecheck.pas index 93fda228..db6856d1 100644 --- a/source/updatecheck.pas +++ b/source/updatecheck.pas @@ -30,6 +30,7 @@ type { Private declarations } CheckfileDownload : TDownLoadURL2; ReleaseURL, BuildURL : String; + FLastStatusUpdate: Cardinal; procedure Status(txt: String); procedure ReadCheckFile; procedure URLOnDownloadProgress(Sender: TDownLoadURL; Progress, ProgressMax: Cardinal; @@ -84,7 +85,7 @@ end; procedure TfrmUpdateCheck.Status(txt: String); begin lblStatus.Caption := txt; - Repaint; + lblStatus.Repaint; end; @@ -302,7 +303,10 @@ end; } procedure TfrmUpdateCheck.URLOnDownloadProgress; begin + if FLastStatusUpdate > GetTickCount-200 then + Exit; Status('Downloading: '+FormatByteNumber(Progress)+' / '+FormatByteNumber(BuildSize) + ' ...'); + FLastStatusUpdate := GetTickCount; end;