Skip to content

Commit

Permalink
separate find-dlg on qt5: fixing #5496
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Jul 19, 2024
1 parent d634c51 commit 72285ef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/formmain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ TfmMain = class(TForm)
FCmdlineFileCount: integer;
FPrevJsonObj: TJSONData;
FPrevFramesEditState: array of TFrameEditState;
FPrevFindDlgVisible: boolean;

function CodeTreeFilter_OnFilterNode(ItemNode: TTreeNode; out Done: Boolean): Boolean;
function ConfirmAllFramesAreSaved(AWithCancel: boolean): boolean;
Expand Down Expand Up @@ -3235,6 +3236,12 @@ procedure TfmMain.AppPropsActivate(Sender: TObject);
F.Editor.Update;
end;

{$if defined(LCLQt5) or defined(LCLQt6)}
//workaround for issue https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40933
if FPrevFindDlgVisible and Assigned(fmFind) and not fmFind.Visible then
fmFind.Show;
{$ifend}

DoPyEvent_AppActivate(TAppPyEvent.OnAppActivate);
end;

Expand All @@ -3254,6 +3261,13 @@ procedure TfmMain.AppPropsDeactivate(Sender: TObject);
CloseFormAutoCompletion;
}

{$if defined(LCLQt5) or defined(LCLQt6)}
//workaround for issue https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40933
FPrevFindDlgVisible:= Assigned(fmFind) and (fmFind.Parent=nil) and fmFind.Visible;
if FPrevFindDlgVisible then
fmFind.Hide;
{$ifend}

DoPyEvent_AppActivate(TAppPyEvent.OnAppDeactivate);
end;

Expand Down

0 comments on commit 72285ef

Please sign in to comment.