mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0002353] Unhandled exception: EAccessViolation: Access violation (when comparing same file in zip archive)
This commit is contained in:
parent
4a530297fe
commit
6faf06d024
2 changed files with 11 additions and 4 deletions
|
|
@ -13,6 +13,7 @@ object frmDiffer: TfrmDiffer
|
|||
OnDestroy = FormDestroy
|
||||
OnKeyDown = FormKeyDown
|
||||
OnResize = FormResize
|
||||
OnShow = FormShow
|
||||
SessionProperties = 'actAutoCompare.Checked;actIgnoreCase.Checked;actIgnoreWhiteSpace.Checked;actKeepScrolling.Checked;actLineDifferences.Checked;actPaintBackground.Checked;Height;Left;Top;Width;WindowState'
|
||||
ShowHint = True
|
||||
ShowInTaskBar = stAlways
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ type
|
|||
procedure FormRestoreProperties(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FormResize(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
BinaryDiffList: TFPList;
|
||||
BinaryDiffIndex: Integer;
|
||||
|
|
@ -278,9 +279,8 @@ begin
|
|||
edtFileNameLeft.Text:= FileNameLeft;
|
||||
edtFileNameRight.Text:= FileNameRight;
|
||||
FShowIdentical:= actAutoCompare.Checked;
|
||||
actBinaryCompare.Checked:= not (FileIsText(FileNameLeft) and FileIsText(FileNameRight));
|
||||
if actBinaryCompare.Checked then
|
||||
actBinaryCompareExecute(actBinaryCompare)
|
||||
if not (FileIsText(FileNameLeft) and FileIsText(FileNameRight)) then
|
||||
actBinaryCompare.Execute
|
||||
else begin
|
||||
OpenFileLeft(FileNameLeft);
|
||||
OpenFileRight(FileNameRight);
|
||||
|
|
@ -519,7 +519,7 @@ begin
|
|||
OpenFileRight(edtFileNameRight.Text);
|
||||
end;
|
||||
|
||||
if actAutoCompare.Checked then actStartCompare.Execute;
|
||||
if Visible and actAutoCompare.Checked then actStartCompare.Execute;
|
||||
end;
|
||||
|
||||
procedure TfrmDiffer.actCancelCompareExecute(Sender: TObject);
|
||||
|
|
@ -727,6 +727,12 @@ begin
|
|||
pnlLeft.Width:= (ClientWidth div 2) - (Splitter.Width div 2);
|
||||
end;
|
||||
|
||||
procedure TfrmDiffer.FormShow(Sender: TObject);
|
||||
begin
|
||||
if actBinaryCompare.Checked and actAutoCompare.Checked then
|
||||
actStartCompare.Execute;
|
||||
end;
|
||||
|
||||
procedure TfrmDiffer.BinaryCompareFinish;
|
||||
begin
|
||||
BinaryCompare:= nil;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue