IDE: load lfm: hide abort button when opening a single form

git-svn-id: trunk@50642 -
This commit is contained in:
mattias 2015-12-05 12:33:40 +00:00
parent 30458feccd
commit f372eb44cc

View File

@ -6884,12 +6884,13 @@ function TLazSourceFileManager.LoadComponentDependencyHidden(
end; end;
var var
Quiet: Boolean; Quiet, HideAbort: Boolean;
LFMFilename: string; LFMFilename: string;
begin begin
Result:=mrCancel; Result:=mrCancel;
AComponentClass:=nil; AComponentClass:=nil;
Quiet:=([ofProjectLoading,ofQuiet]*Flags<>[]); Quiet:=([ofProjectLoading,ofQuiet]*Flags<>[]);
HideAbort:=not (ofProjectLoading in Flags);
if (AComponentClassName='') or (not IsValidIdent(AComponentClassName)) then if (AComponentClassName='') or (not IsValidIdent(AComponentClassName)) then
begin begin
@ -6899,10 +6900,9 @@ begin
// check for cycles // check for cycles
if AnUnitInfo.LoadingComponent then begin if AnUnitInfo.LoadingComponent then begin
Result:=IDEQuestionDialog(lisCodeTemplError, Result:=IDEQuestionDialogAb(lisCodeTemplError,
Format(lisUnableToLoadTheComponentClassBecauseItDependsOnIts, [AComponentClassName]), Format(lisUnableToLoadTheComponentClassBecauseItDependsOnIts, [AComponentClassName]),
mtError, [mrCancel, lisCancelLoadingThisComponent, mtError, [mrCancel, lisCancelLoadingThisComponent],HideAbort);
mrAbort, lisAbortWholeLoading]);
exit; exit;
end; end;
@ -6936,12 +6936,12 @@ begin
Result:=mrCancel; Result:=mrCancel;
if Result=mrAbort then exit; if Result=mrAbort then exit;
if Result<>mrOk then begin if Result<>mrOk then begin
Result:=IDEQuestionDialog(lisCodeTemplError, Result:=IDEQuestionDialogAb(lisCodeTemplError,
Format(lisUnableToFindTheComponentClassItIsNotRegisteredViaR, [ Format(lisUnableToFindTheComponentClassItIsNotRegisteredViaR, [
AComponentClassName, LineEnding, LineEnding, LineEnding, AnUnitInfo.Filename]), AComponentClassName, LineEnding, LineEnding, LineEnding, AnUnitInfo.Filename]),
mtError, [mrCancel, lisCancelLoadingThisComponent, mtError, [mrCancel, lisCancelLoadingThisComponent,
mrAbort, lisAbortWholeLoading, mrIgnore, lisIgnoreUseTFormAsAncestor],
mrIgnore, lisIgnoreUseTFormAsAncestor]); HideAbort);
end; end;
finally finally
AnUnitInfo.LoadingComponent:=false; AnUnitInfo.LoadingComponent:=false;