mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 13:39:21 +02:00
IDE: Minor optimization and formatting.
This commit is contained in:
parent
0f4a7bbc7e
commit
5dc0aebd74
@ -4331,8 +4331,7 @@ begin
|
||||
if AnUnitName='' then exit(-1);
|
||||
Result:=UnitCount-1;
|
||||
while (Result>=0) do begin
|
||||
if ((OnlyProjectUnits and Units[Result].IsPartOfProject)
|
||||
or (not OnlyProjectUnits))
|
||||
if (Units[Result].IsPartOfProject or not OnlyProjectUnits)
|
||||
and (IgnoreUnit<>Units[Result])
|
||||
and (Units[Result].Unit_Name<>'')
|
||||
then begin
|
||||
@ -4349,8 +4348,7 @@ function TProject.IndexOfUnitWithComponent(AComponent: TComponent;
|
||||
begin
|
||||
Result:=UnitCount-1;
|
||||
while (Result>=0) do begin
|
||||
if (OnlyProjectUnits and Units[Result].IsPartOfProject)
|
||||
or (not OnlyProjectUnits)
|
||||
if (Units[Result].IsPartOfProject or not OnlyProjectUnits)
|
||||
and (IgnoreUnit<>Units[Result]) then begin
|
||||
if Units[Result].Component=AComponent then
|
||||
exit;
|
||||
@ -4364,8 +4362,7 @@ function TProject.IndexOfUnitWithComponentName(const AComponentName: string;
|
||||
begin
|
||||
Result:=UnitCount-1;
|
||||
while (Result>=0) do begin
|
||||
if ((OnlyProjectUnits and Units[Result].IsPartOfProject)
|
||||
or (not OnlyProjectUnits))
|
||||
if (Units[Result].IsPartOfProject or not OnlyProjectUnits)
|
||||
and (IgnoreUnit<>Units[Result]) then begin
|
||||
if (CompareText(Units[Result].ComponentName,AComponentName)=0)
|
||||
or ((Units[Result].Component<>nil)
|
||||
@ -4388,7 +4385,8 @@ begin
|
||||
end;
|
||||
|
||||
function TProject.GetResourceFile(AnUnitInfo: TUnitInfo; Index:integer): TCodeBuffer;
|
||||
var i, LinkIndex: integer;
|
||||
var
|
||||
i, LinkIndex: integer;
|
||||
begin
|
||||
LinkIndex:=-1;
|
||||
i:=0;
|
||||
|
@ -1202,13 +1202,6 @@ begin
|
||||
DoMoveDependency(-1);
|
||||
end;
|
||||
|
||||
procedure TPackageEditorForm.OnIdle(Sender: TObject; var Done: Boolean);
|
||||
begin
|
||||
if fUpdateLock>0 then exit;
|
||||
IdleConnected:=false;
|
||||
UpdatePending;
|
||||
end;
|
||||
|
||||
procedure TPackageEditorForm.MoveDownBtnClick(Sender: TObject);
|
||||
begin
|
||||
if SortAlphabetically then exit;
|
||||
@ -1218,6 +1211,13 @@ begin
|
||||
DoMoveDependency(1)
|
||||
end;
|
||||
|
||||
procedure TPackageEditorForm.OnIdle(Sender: TObject; var Done: Boolean);
|
||||
begin
|
||||
if fUpdateLock>0 then exit;
|
||||
IdleConnected:=false;
|
||||
UpdatePending;
|
||||
end;
|
||||
|
||||
procedure TPackageEditorForm.OpenButtonClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user