mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
#394: fix setting focus on filter panel when activating it
This commit is contained in:
@@ -10878,15 +10878,13 @@ end;
|
||||
|
||||
|
||||
procedure TMainForm.actFilterPanelExecute(Sender: TObject);
|
||||
var
|
||||
MakeVisible: Boolean;
|
||||
begin
|
||||
// (De-)activate or focus filter panel
|
||||
if Sender <> actFilterPanel then
|
||||
actFilterPanel.Checked := not actFilterPanel.Checked;
|
||||
pnlFilterVT.Visible := actFilterPanel.Checked;
|
||||
// On startup, we cannot SetFocus, throws exceptons. Call with nil in that special case - see FormCreate
|
||||
if Assigned(Sender) and MakeVisible and editFilterVT.CanFocus then
|
||||
if pnlFilterVT.Visible and editFilterVT.CanFocus and (Sender <> nil) then
|
||||
editFilterVT.SetFocus;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user