Packager: Prevent error when opening a package dependency which is already open. Issue #28963, patch from Cyrax.

git-svn-id: trunk@50233 -
This commit is contained in:
juha 2015-11-06 12:09:35 +00:00
parent a1e2f1e248
commit 968fd42946

View File

@ -3387,7 +3387,8 @@ function TPackageEditors.CreateEditor(Pkg: TLazPackage;
begin
Result:=FindEditor(Pkg);
if Result<>nil then begin
if DoDisableAutoSizing then
Result.DisableAutoSizing;
if not DoDisableAutoSizing then
Result.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TAnchorDockMaster Delayed'){$ENDIF};
end else begin
Result:=TPackageEditorForm(TPackageEditorForm.NewInstance);
@ -3414,7 +3415,8 @@ begin
try
IDEWindowCreators.ShowForm(Result, BringToFront);
finally
Result.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TAnchorDockMaster Delayed'){$ENDIF};
if Result.AutoSizingLockCount > 0 then
Result.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TAnchorDockMaster Delayed'){$ENDIF};
end;
end;