mirror of https://gitlab.com/basile.b/dexed.git
tweaked getContext
This commit is contained in:
parent
78318f90a7
commit
9c25a5e206
|
@ -251,7 +251,6 @@ end;
|
||||||
|
|
||||||
procedure TCETodoListWidget.docChanged(aDoc: TCESynMemo);
|
procedure TCETodoListWidget.docChanged(aDoc: TCESynMemo);
|
||||||
begin
|
begin
|
||||||
if fDoc <> aDoc then exit;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCETodoListWidget.docClosing(aDoc: TCESynMemo);
|
procedure TCETodoListWidget.docClosing(aDoc: TCESynMemo);
|
||||||
|
@ -298,15 +297,12 @@ end;
|
||||||
{$REGION Todo list things ------------------------------------------------------}
|
{$REGION Todo list things ------------------------------------------------------}
|
||||||
function TCETodoListWidget.getContext: TTodoContext;
|
function TCETodoListWidget.getContext: TTodoContext;
|
||||||
begin
|
begin
|
||||||
result := tcNone;
|
if ((fProj = nil) and (fDoc = nil)) then exit(tcNone);
|
||||||
//
|
|
||||||
if ((fProj = nil) and (fDoc = nil)) then exit;
|
|
||||||
if ((fProj = nil) and (fDoc <> nil)) then exit(tcFile);
|
if ((fProj = nil) and (fDoc <> nil)) then exit(tcFile);
|
||||||
if ((fProj <> nil) and (fDoc = nil)) then exit(tcProject);
|
if ((fProj <> nil) and (fDoc = nil)) then exit(tcProject);
|
||||||
//
|
//
|
||||||
result := tcFile;
|
if fProj.isProjectSource(fDoc.fileName) then
|
||||||
if not FileExists(fDoc.fileName) then exit;
|
exit(tcProject) else exit(tcFile);
|
||||||
if fProj.isProjectSource(fDoc.fileName) then exit(tcProject);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCETodoListWidget.killToolProcess;
|
procedure TCETodoListWidget.killToolProcess;
|
||||||
|
|
Loading…
Reference in New Issue