IDE: fpdoceditor: do not update on idle when a modal form is shown

git-svn-id: trunk@25696 -
This commit is contained in:
mattias 2010-05-27 15:12:42 +00:00
parent 94e1c3958b
commit fd51b5dcdc

View File

@ -415,12 +415,17 @@ begin
end; end;
procedure TFPDocEditor.ApplicationIdle(Sender: TObject; var Done: Boolean); procedure TFPDocEditor.ApplicationIdle(Sender: TObject; var Done: Boolean);
var
ActiveForm: TCustomForm;
begin begin
if fUpdateLock>0 then if (fUpdateLock>0) then
begin begin
DebugLn(['WARNING: TFPDocEditor.ApplicationIdle fUpdateLock>0']); DebugLn(['WARNING: TFPDocEditor.ApplicationIdle fUpdateLock>0']);
exit; exit;
end; end;
if not IsVisible then exit;
ActiveForm:=Screen.ActiveCustomForm;
if (ActiveForm<>nil) and (fsModal in ActiveForm.FormState) then exit;
Done:=false; Done:=false;
if fpdefCodeCacheNeedsUpdate in FFlags then if fpdefCodeCacheNeedsUpdate in FFlags then
UpdateCodeCache UpdateCodeCache