disable widgets timers by default

This commit is contained in:
Basile Burg 2016-10-28 10:46:28 +02:00
parent 49ecb0aa0a
commit 0a80061d92
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 13 additions and 3 deletions

View File

@ -256,6 +256,10 @@ begin
widg.fastDisplay:= fFastDisplay;
widg.fMsgColors := fMsgColors;
widg.fAutoDemangle:=fAutoDemangle;
if fFastDisplay then
widg.updaterByLoopInterval:= 70
else
widg.updaterByLoopInterval:= 0;
end
else inherited;
end;

View File

@ -144,7 +144,7 @@ begin
fToolBarVisible := true;
fIsDockable := true;
fUpdaterAuto := TTimer.Create(self);
fUpdaterAuto.Interval := 70;
fUpdaterAuto.Interval := 0;
fUpdaterAuto.OnTimer := @updaterAutoProc;
fUpdaterDelay := TTimer.Create(self);
@ -269,10 +269,16 @@ end;
procedure TCEWidget.setLoopInt(value: Integer);
begin
if value < 30 then value := 30;
if fLoopInter = value then exit;
if fLoopInter = value then
exit;
fLoopInter := value;
fUpdaterAuto.Interval := fLoopInter;
if value = 0 then
begin
fUpdaterAuto.Enabled:= false;
fLoopUpdateCount := 0;
end
else fUpdaterAuto.Enabled:= true;
end;
procedure TCEWidget.IncLoopUpdate;