mirror of https://gitlab.com/basile.b/dexed.git
upstream fix, projects groups, the fsp was always focused...
...even when CE exited when a group item was focused
This commit is contained in:
parent
5a81971bb8
commit
205f8080bd
|
@ -930,37 +930,39 @@ end;
|
||||||
|
|
||||||
procedure TCELastDocsAndProjs.Assign(source: TPersistent);
|
procedure TCELastDocsAndProjs.Assign(source: TPersistent);
|
||||||
var
|
var
|
||||||
itf: ICECommonProject = nil;
|
grp: ICEProjectGroup;
|
||||||
|
prj: ICECommonProject = nil;
|
||||||
|
pix: integer;
|
||||||
begin
|
begin
|
||||||
if source = CEMainForm then
|
if source = CEMainForm then
|
||||||
begin
|
begin
|
||||||
itf := CEMainForm.fFreeProj;
|
grp := getProjectGroup;
|
||||||
if assigned(itf) then
|
pix := grp.getProjectIndex;
|
||||||
fProject := itf.filename;
|
prj := CEMainForm.fFreeProj;
|
||||||
|
if assigned(prj) then
|
||||||
|
fProject := prj.filename;
|
||||||
fProjectGroup := getProjectGroup.groupFilename;
|
fProjectGroup := getProjectGroup.groupFilename;
|
||||||
if itf = CEMainForm.fProject then
|
if prj = CEMainForm.fProject then
|
||||||
fProjectIndex :=- 1
|
fProjectIndex :=- 1
|
||||||
else
|
else
|
||||||
fProjectIndex := getProjectGroup.getProjectIndex;
|
fProjectIndex := pix;
|
||||||
end else
|
end else
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCELastDocsAndProjs.AssignTo(target: TPersistent);
|
procedure TCELastDocsAndProjs.AssignTo(target: TPersistent);
|
||||||
var
|
var
|
||||||
itf: ICECommonProject = nil;
|
|
||||||
dst: TCEMainForm;
|
dst: TCEMainForm;
|
||||||
hdl: ICEMultiDocHandler;
|
hdl: ICEMultiDocHandler;
|
||||||
mem: TCESynMemo = nil;
|
mem: TCESynMemo = nil;
|
||||||
|
grp: ICEProjectGroup;
|
||||||
begin
|
begin
|
||||||
if target is TCEMainForm then
|
if target is TCEMainForm then
|
||||||
begin
|
begin
|
||||||
dst := TCEMainForm(target);
|
dst := TCEMainForm(target);
|
||||||
if dst.fProjFromCommandLine then
|
if dst.fProjFromCommandLine then
|
||||||
exit;
|
exit;
|
||||||
itf := dst.fProject;
|
|
||||||
if assigned(itf) and (itf.filename = fProject) and
|
|
||||||
(itf.filename.fileExists) then exit;
|
|
||||||
if fProject.isNotEmpty and fProject.fileExists then
|
if fProject.isNotEmpty and fProject.fileExists then
|
||||||
begin
|
begin
|
||||||
dst.openProj(fProject);
|
dst.openProj(fProject);
|
||||||
|
@ -973,14 +975,20 @@ begin
|
||||||
else
|
else
|
||||||
mem.Highlighter := JsSyn;
|
mem.Highlighter := JsSyn;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
grp := getProjectGroup;
|
||||||
if fProjectGroup.isNotEmpty and fProjectGroup.fileExists then
|
if fProjectGroup.isNotEmpty and fProjectGroup.fileExists then
|
||||||
begin
|
grp.openGroup(fProjectGroup);
|
||||||
getProjectGroup.openGroup(fProjectGroup);
|
|
||||||
end;
|
|
||||||
if (fProjectIndex = -1) and assigned(dst.fFreeProj) then
|
if (fProjectIndex = -1) and assigned(dst.fFreeProj) then
|
||||||
dst.fFreeProj.activate;
|
dst.fFreeProj.activate
|
||||||
end else
|
else if (fProjectIndex >= 0) and (grp.projectCount > 0)
|
||||||
inherited;
|
and (fProjectIndex < grp.projectCount) then
|
||||||
|
begin
|
||||||
|
grp.setProjectIndex(fProjectIndex);
|
||||||
|
grp.getProject(grp.getProjectIndex).activate;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCELastDocsAndProjs.setDocuments(value: TStringList);
|
procedure TCELastDocsAndProjs.setDocuments(value: TStringList);
|
||||||
|
|
Loading…
Reference in New Issue