FIX: the order of closing FileView and closing QuickView (#738)

This commit is contained in:
rich2014 2023-01-04 16:20:07 +08:00 committed by GitHub
commit e5c415f661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -2580,9 +2580,7 @@ begin
end;
end;
if Assigned(QuickViewPanel) then
Commands.cm_QuickView(['Close']);
QuickViewClose;
UpdatePrompt;
UpdateTreeViewPath;
UpdateMainTitleBar;
@ -4974,7 +4972,7 @@ begin
else
Exit(1);
end;
if Assigned(QuickViewPanel) then QuickViewClose;
QuickViewClose;
ANoteBook.RemovePage(iPageIndex);
if UserAnswer=mmrAll then Result:=3 else Result:= 0;
@ -5128,6 +5126,8 @@ var
begin
if Destination<>tclNone then
begin
QuickViewClose;
// 1. Normalize our destination side and destination to keep in case params specified active/inactive
if ((Destination=tclActive) and (ActiveFrame=FrameLeft)) OR ((Destination=tclInactive) and (NotActiveFrame=FrameLeft)) then Destination:=tclLeft;
if ((Destination=tclActive) and (ActiveFrame=FrameRight)) OR ((Destination=tclInactive) and (NotActiveFrame=FrameRight)) then Destination:=tclRight;

View file

@ -83,8 +83,11 @@ end;
procedure QuickViewClose;
begin
FreeAndNil(QuickViewPanel);
frmMain.actQuickView.Checked:= False;
if Assigned(QuickViewPanel) then
begin
FreeAndNil(QuickViewPanel);
frmMain.actQuickView.Checked:= False;
end;
end;
{ TQuickViewPanel }