diff --git a/src/ce_lcldragdrop.pas b/src/ce_lcldragdrop.pas index 6ed29f3f..98723720 100644 --- a/src/ce_lcldragdrop.pas +++ b/src/ce_lcldragdrop.pas @@ -72,7 +72,9 @@ procedure TDDHandler.projFocused(project: ICECommonProject); begin fProj := project; if not fProj.inGroup then - fFreeProj := fProj; + fFreeProj := fProj + else if fFreeProj = project then + fFreeProj := nil; end; procedure TDDHandler.projCompiling(project: ICECommonProject); diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas index f876650e..6d8791fc 100644 --- a/src/ce_libmaneditor.pas +++ b/src/ce_libmaneditor.pas @@ -145,7 +145,9 @@ procedure TCELibManEditorWidget.projFocused(project: ICECommonProject); begin fProj := project; if not project.inGroup then - fFreeProj := project; + fFreeProj := project + else if project = fFreeProj then + fFreeProj := nil; updateButtonsState; end; diff --git a/src/ce_main.pas b/src/ce_main.pas index 5cd067d2..a5c328e5 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -1987,7 +1987,7 @@ begin end; if not fProject.inGroup then fFreeProj := project - else if (fProject = fFreeProj) and (fProject.inGroup) then + else if project = fFreeProj then fFreeProj := nil; showProjTitle; diff --git a/src/ce_miniexplorer.pas b/src/ce_miniexplorer.pas index 15d58c6a..a3d7cd23 100644 --- a/src/ce_miniexplorer.pas +++ b/src/ce_miniexplorer.pas @@ -334,7 +334,9 @@ procedure TCEMiniExplorerWidget.projFocused(project: ICECommonProject); begin fProj := project; if not project.inGroup then - fFreeProj := project; + fFreeProj := project + else if fFreeProj = project then + fFreeProj := nil; if visible and project.fileName.fileExists and fContextExpand then expandPath(project.fileName.extractFilePath); end; diff --git a/src/ce_projgroup.pas b/src/ce_projgroup.pas index 04eb16da..231134b5 100644 --- a/src/ce_projgroup.pas +++ b/src/ce_projgroup.pas @@ -503,7 +503,7 @@ begin fFreeProj := project; updateList; end - else if (project = fFreeProj) and (project.inGroup) then + else if project = fFreeProj then begin fFreeProj := nil; updateList; @@ -674,7 +674,7 @@ var const typeStr: array[TCEProjectFormat] of string = ('CE','DUB'); begin - lstProj.Clear; + lstProj.Items.Clear; for i := 0 to projectGroup.projectCount-1 do begin with lstProj.Items.Add do