mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 21:29:36 +02:00
IDE: search results view: fixed close while docked
git-svn-id: trunk@64898 -
This commit is contained in:
parent
047a6801cc
commit
165e812983
@ -365,20 +365,7 @@ end;
|
||||
|
||||
procedure TSearchResultsView.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
// Using a dock manager...
|
||||
if Parent<>nil then
|
||||
begin
|
||||
CloseAction := caNone;
|
||||
//todo: helper function in DockManager or IDEDockMaster for closing forms.
|
||||
// Only close the window if it's floating.
|
||||
// AnchorDocking doesn't seem to initialize 'FloatingDockSiteClass' so we can't just check 'Floating'.
|
||||
// Also, AnchorDocking use nested forms, so the check for HostDockSite.Parent.
|
||||
if Assigned(HostDockSite) and (HostDockSite.DockClientCount <= 1)
|
||||
and (HostDockSite is TCustomForm) and (HostDockSite.Parent = nil) then
|
||||
begin
|
||||
TCustomForm(HostDockSite).Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TSearchResultsView.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
|
Loading…
Reference in New Issue
Block a user