mirror of https://gitlab.com/basile.b/dexed.git
fix #185 - diff dialog shown twice on external modification
This commit is contained in:
parent
462214cec3
commit
4733c1d5f8
|
@ -236,6 +236,7 @@ type
|
||||||
fKnowsDscanner: boolean;
|
fKnowsDscanner: boolean;
|
||||||
fDscannerEnabled: boolean;
|
fDscannerEnabled: boolean;
|
||||||
fScrollPreview: boolean;
|
fScrollPreview: boolean;
|
||||||
|
fDiffDialogWillClose: boolean;
|
||||||
procedure showHintEvent(Sender: TObject; HintInfo: PHintInfo);
|
procedure showHintEvent(Sender: TObject; HintInfo: PHintInfo);
|
||||||
procedure setGutterTransparent(value: boolean);
|
procedure setGutterTransparent(value: boolean);
|
||||||
procedure decCallTipsLvl;
|
procedure decCallTipsLvl;
|
||||||
|
@ -2893,7 +2894,7 @@ var
|
||||||
str: TStringList;
|
str: TStringList;
|
||||||
txt: string;
|
txt: string;
|
||||||
begin
|
begin
|
||||||
if fDisableFileDateCheck then
|
if fDiffDialogWillClose or fDisableFileDateCheck then
|
||||||
exit;
|
exit;
|
||||||
if fFilename.isNotEmpty and not fFilename.fileExists and
|
if fFilename.isNotEmpty and not fFilename.fileExists and
|
||||||
(fFilename <> '<new document>') then
|
(fFilename <> '<new document>') then
|
||||||
|
@ -2916,6 +2917,7 @@ begin
|
||||||
if not MDMatch(curMd5, newMd5) then
|
if not MDMatch(curMd5, newMd5) then
|
||||||
begin
|
begin
|
||||||
lines.SaveToFile(tempFilename);
|
lines.SaveToFile(tempFilename);
|
||||||
|
fDiffDialogWillClose := true;
|
||||||
With TCEDiffViewer.construct(fTempFileName, fFilename) do
|
With TCEDiffViewer.construct(fTempFileName, fFilename) do
|
||||||
try
|
try
|
||||||
mr := ShowModal;
|
mr := ShowModal;
|
||||||
|
@ -2930,6 +2932,7 @@ begin
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
free;
|
free;
|
||||||
|
fDiffDialogWillClose := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
|
Loading…
Reference in New Issue