fix #302 - Message that warns about changes after reloading from diff dialog is confusing

This commit is contained in:
Basile Burg 2018-04-27 07:46:37 +02:00
parent 5d641ffdf9
commit 82e9cbc4cc
2 changed files with 5 additions and 3 deletions

View File

@ -6,7 +6,7 @@ object CEDiffViewer: TCEDiffViewer
Caption = 'External file modification' Caption = 'External file modification'
ClientHeight = 441 ClientHeight = 441
ClientWidth = 516 ClientWidth = 516
LCLVersion = '1.8.0.6' Visible = False
inline editor: TSynEdit inline editor: TSynEdit
Left = 4 Left = 4
Height = 385 Height = 385
@ -139,7 +139,7 @@ object CEDiffViewer: TCEDiffViewer
TabOrder = 0 TabOrder = 0
end end
object btnAccept: TBitBtn object btnAccept: TBitBtn
Left = 283 Left = 380
Height = 29 Height = 29
Hint = 'Load the new version' Hint = 'Load the new version'
Top = 2 Top = 2
@ -155,7 +155,7 @@ object CEDiffViewer: TCEDiffViewer
TabOrder = 1 TabOrder = 1
end end
object btnCancel: TBitBtn object btnCancel: TBitBtn
Left = 412 Left = 283
Height = 29 Height = 29
Hint = 'Don''t reload the modifications for now' Hint = 'Don''t reload the modifications for now'
Top = 2 Top = 2

View File

@ -3236,6 +3236,7 @@ var
curMd5: TMDDigest; curMd5: TMDDigest;
str: TStringList; str: TStringList;
txt: string; txt: string;
i: integer;
begin begin
if fDiffDialogWillClose or fDisableFileDateCheck then if fDiffDialogWillClose or fDisableFileDateCheck then
exit; exit;
@ -3268,6 +3269,7 @@ begin
mrOK: mrOK:
begin begin
replaceUndoableContent(str.strictText); replaceUndoableContent(str.strictText);
fModified := false;
fFileDate := newDate; fFileDate := newDate;
end; end;
mrIgnore: fFileDate := newDate; mrIgnore: fFileDate := newDate;