mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:59:06 +02:00
ProjectGroups: Call ActiveChanged() when compiling all. Updates an indicator in the GUI. Issue #32475.
This commit is contained in:
parent
3abc423cba
commit
229162c203
@ -1211,13 +1211,13 @@ end;
|
|||||||
procedure TIDEProjectGroup.ActiveTargetChanged(T: TPGCompileTarget);
|
procedure TIDEProjectGroup.ActiveTargetChanged(T: TPGCompileTarget);
|
||||||
var
|
var
|
||||||
Root: TIDEProjectGroup;
|
Root: TIDEProjectGroup;
|
||||||
begin
|
begin // T=Nil means the compilation ended and the GUI should be restored.
|
||||||
if T.Active then begin
|
if Assigned(T) then
|
||||||
FActiveTarget:=T;
|
if T.Active then
|
||||||
end else begin
|
FActiveTarget:=T
|
||||||
|
else
|
||||||
if FActiveTarget=T then
|
if FActiveTarget=T then
|
||||||
FActiveTarget:=nil;
|
FActiveTarget:=nil;
|
||||||
end;
|
|
||||||
Root:=TIDEProjectGroup(GetRootGroup);
|
Root:=TIDEProjectGroup(GetRootGroup);
|
||||||
if Assigned(Root.OnTargetActiveChanged) then
|
if Assigned(Root.OnTargetActiveChanged) then
|
||||||
Root.OnTargetActiveChanged(Self,T);
|
Root.OnTargetActiveChanged(Self,T);
|
||||||
@ -2002,14 +2002,18 @@ begin
|
|||||||
taSettings: ;
|
taSettings: ;
|
||||||
taCompile,
|
taCompile,
|
||||||
taCompileClean:
|
taCompileClean:
|
||||||
begin
|
try
|
||||||
for i:=0 to ProjectGroup.TargetCount-1 do begin
|
for i:=0 to ProjectGroup.TargetCount-1 do begin
|
||||||
aTarget:=TIDECompileTarget(ProjectGroup.Targets[i]);
|
aTarget:=TIDECompileTarget(ProjectGroup.Targets[i]);
|
||||||
if AAction in aTarget.AllowedActions then
|
if AAction in aTarget.AllowedActions then begin
|
||||||
|
ActiveChanged(aTarget);
|
||||||
if aTarget.PerformAction(AAction)<>arOk then
|
if aTarget.PerformAction(AAction)<>arOk then
|
||||||
exit;
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
Result:=arOk;
|
Result:=arOk;
|
||||||
|
finally
|
||||||
|
ActiveChanged(Nil);
|
||||||
end;
|
end;
|
||||||
taCompileFromHere:
|
taCompileFromHere:
|
||||||
begin
|
begin
|
||||||
@ -2017,6 +2021,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
Result:=arOK;
|
Result:=arOK;
|
||||||
aTarget:=TIDECompileTarget(GetNext(true));
|
aTarget:=TIDECompileTarget(GetNext(true));
|
||||||
|
ActiveChanged(aTarget);
|
||||||
if aTarget=nil then exit;
|
if aTarget=nil then exit;
|
||||||
Result:=aTarget.PerformAction(taCompileFromHere);
|
Result:=aTarget.PerformAction(taCompileFromHere);
|
||||||
end;
|
end;
|
||||||
|
@ -888,8 +888,10 @@ begin
|
|||||||
NewActiveTVNode.StateIndex:=NSIActive;
|
NewActiveTVNode.StateIndex:=NSIActive;
|
||||||
FActiveTarget:=Target;
|
FActiveTarget:=Target;
|
||||||
end;
|
end;
|
||||||
//N:=DisplayFileName(Target);
|
if Assigned(Target) then
|
||||||
//SBPG.Panels[piActiveTarget].Text:=Format(lisActiveTarget,[N]);
|
SBPG.Panels[piActiveTarget].Text:=Format(lisActiveTarget,[DisplayFileName(Target)])
|
||||||
|
else
|
||||||
|
TVPGSelectionChanged(Nil); // Restore the original status text.
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectGroupEditorForm.OnTargetExchanged(Sender: TObject; Target1,
|
procedure TProjectGroupEditorForm.OnTargetExchanged(Sender: TObject; Target1,
|
||||||
|
Loading…
Reference in New Issue
Block a user