IDE: update package editor name

git-svn-id: trunk@26232 -
This commit is contained in:
mattias 2010-06-21 11:38:27 +00:00
parent a8f9721a8d
commit c63d6dcfad

View File

@ -1385,7 +1385,11 @@ begin
if FLazPackage=AValue then exit; if FLazPackage=AValue then exit;
if FLazPackage<>nil then FLazPackage.Editor:=nil; if FLazPackage<>nil then FLazPackage.Editor:=nil;
FLazPackage:=AValue; FLazPackage:=AValue;
if FLazPackage=nil then exit; if FLazPackage=nil then begin
Name:=Name+'___off___';
exit;
end;
Name:=PackageEditorWindowPrefix+LazPackage.Name;
FLazPackage.Editor:=Self; FLazPackage.Editor:=Self;
PackageEditors.ApplyLayout(Self); PackageEditors.ApplyLayout(Self);
// update components // update components
@ -1621,6 +1625,7 @@ end;
procedure TPackageEditorForm.UpdateAll(Immediately: boolean); procedure TPackageEditorForm.UpdateAll(Immediately: boolean);
begin begin
if LazPackage=nil then exit; if LazPackage=nil then exit;
Name:=PackageEditorWindowPrefix+LazPackage.Name;
if not Immediately then begin if not Immediately then begin
if FNeedUpdateAll then exit; if FNeedUpdateAll then exit;
FNeedUpdateAll:=true; FNeedUpdateAll:=true;
@ -2412,8 +2417,7 @@ function TPackageEditors.OpenEditor(Pkg: TLazPackage): TPackageEditorForm;
begin begin
Result:=FindEditor(Pkg); Result:=FindEditor(Pkg);
if Result=nil then begin if Result=nil then begin
Result:=TPackageEditorForm.Create(Application); Result:=TPackageEditorForm.Create(LazarusIDE.OwningComponent);
Result.Name:=PackageEditorWindowPrefix+Pkg.Name;
Result.LazPackage:=Pkg; Result.LazPackage:=Pkg;
FItems.Add(Result); FItems.Add(Result);
end; end;