mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 09:18:18 +02:00
Merge branch 'issue-40920-by-n8700-mrcancel-not-handled' into 'main'
Draft: FOR REVIEW ( Issue #40920 ): Handle mrCancel in question dialogs. See merge request freepascal.org/lazarus/lazarus!281
This commit is contained in:
commit
b235c7b0bc
@ -3664,7 +3664,7 @@ begin
|
||||
Result:=CheckIfCurPkgOutDirNeedsCompile(APackage,
|
||||
true,SkipDesignTimePackages,GroupCompile,
|
||||
NeedBuildAllFlag,ConfigChanged,DependenciesChanged,Note);
|
||||
if Result=mrNo then begin
|
||||
if Result in [mrNo, mrCancel] then begin
|
||||
// the current output is valid
|
||||
exit;
|
||||
end;
|
||||
@ -3729,7 +3729,7 @@ begin
|
||||
DefResult:=CheckIfCurPkgOutDirNeedsCompile(APackage,
|
||||
true,SkipDesignTimePackages,GroupCompile,
|
||||
NeedBuildAllFlag,ConfigChanged,DependenciesChanged,Note);
|
||||
if IsDefDirWritable or (DefResult=mrNo) then begin
|
||||
if IsDefDirWritable or (DefResult in [mrNo, mrCancel]) then begin
|
||||
// switching back to the default output directory
|
||||
debugln(['Hint: (lazarus) switching back to the normal output directory: "',APackage.GetOutputDirectory,'" Package ',APackage.IDAsString]);
|
||||
Note+='Switching back to default output directory.'+LineEnding;
|
||||
@ -4484,7 +4484,7 @@ begin
|
||||
if Note<>'' then
|
||||
Note:='Compile reason: '+Note;
|
||||
if (pcfOnlyIfNeeded in Flags) then begin
|
||||
if Result=mrNo then begin
|
||||
if Result in [mrNo, mrCancel] then begin
|
||||
//DebugLn(['TLazPackageGraph.CompilePackage ',APackage.IDAsString,' does not need compilation.']);
|
||||
Result:=mrOk;
|
||||
exit;
|
||||
|
@ -1514,7 +1514,7 @@ procedure TMainForm.DoImport(const EngineName, ConnectionString: String);
|
||||
Function UseNewDataDict : Boolean;
|
||||
|
||||
begin
|
||||
Result:=(mrNo=QuestionDLG(SImportDictInto,SWhichCurrentDictToUse,mtInformation,[mrYes,SUseCurrentDict,mrNo,SUseNewDict],0))
|
||||
Result:=mrYes<>QuestionDlg(SImportDictInto,SWhichCurrentDictToUse,mtInformation,[mrYes,SUseCurrentDict,mrNo,SUseNewDict],0);
|
||||
end;
|
||||
|
||||
Var
|
||||
|
Loading…
Reference in New Issue
Block a user