Merged revision(s) 60719 #016a724523, 61823 #35506f673d, 61898 #ad89fb55f9 from trunk:

IDE: Call DoCallBuildingFinishedHandler after ToolState is reset. Issue #35240.
........
ShellCtrls: fix rasing excption when changing TShellTreeView.FileSortType in designer. Issue #0036055.

........
IDE: EditorMacros, fix generating error msg (avoid index out of range error). Fix type in test for whitespace. Issue #0036082
........

git-svn-id: branches/fixes_2_0@61928 -
This commit is contained in:
martin 2019-09-26 17:23:17 +00:00
parent 8788f97e77
commit e9c272a676
3 changed files with 17 additions and 8 deletions

View File

@ -792,8 +792,14 @@ var
begin
f := TStringList.Create;
f.Text := copy(FOrigText,1 ,FPos);
Result.y := f.Count;
Result.x := length(f[f.Count-1])+1;
if f.Count = 0 then begin
Result.y := 1;
Result.x := 1;
end
else begin
Result.y := f.Count;
Result.x := length(f[f.Count-1])+1;
end;
f.Free;
end;
@ -848,11 +854,13 @@ end;
function TIdeMacroEventReader.ParseNextEvent: Boolean;
procedure SkipNum(var i: integer);
begin
while (i <= Length(FText)) and (FText[i] in ['0'..'9']) do inc (i);
while (i <= Length(FText)) and (FText[i] in ['0'..'9']) do
inc(i);
end;
procedure SkipSpace(var i: integer);
begin
while (i <= Length(FText)) and (FText[i] in [' '..#9, #13, #10]) do inc (i);
while (i <= Length(FText)) and (FText[i] in [' ', #9, #13, #10]) do
inc(i);
end;
var
c,i,j,k: Integer;

View File

@ -6923,7 +6923,6 @@ begin
aCompileHint);
if ConsoleVerbosity>=0 then
debugln(['Hint: (lazarus) [TMainIDE.DoBuildProject] compiler time in s: ',(Now-StartTime)*86400]);
DoCallBuildingFinishedHandler(lihtProjectBuildingFinished, Self, Result=mrOk);
if Result<>mrOk then begin
// save state, so that next time the project is not compiled clean
Project1.LastCompilerFilename:=CompilerFilename;
@ -6971,6 +6970,8 @@ begin
end
else
ToolStatus:=itNone;
// Call handlers set by plugins
DoCallBuildingFinishedHandler(lihtProjectBuildingFinished, Self, Result=mrOk);
end;
finally
// check sources
@ -7663,7 +7664,6 @@ begin
// make lazarus ide
IDEBuildFlags:=IDEBuildFlags+[blfUseMakeIDECfg,blfDontClean];
Result:=fBuilder.MakeLazarus(BuildLazProfiles.Current, IDEBuildFlags);
DoCallBuildingFinishedHandler(lihtLazarusBuildingFinished, Self, Result=mrOk);
if Result<>mrOk then exit;
if fBuilder.ProfileChanged then begin
@ -7672,8 +7672,9 @@ begin
end;
finally
MainBuildBoss.SetBuildTargetProject1(true);
DoCheckFilesOnDisk;
ToolStatus:=OldToolStatus;
DoCallBuildingFinishedHandler(lihtLazarusBuildingFinished, Self, Result=mrOk);
DoCheckFilesOnDisk;
end;
end;

View File

@ -513,7 +513,7 @@ var
begin
if FFileSortType=AValue then exit;
FFileSortType:=AValue;
if (csLoading in ComponentState) then Exit;
if (([csLoading,csDesigning] * ComponentState) <> []) then Exit;
CurrPath := GetPath;
try
BeginUpdate;