mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Minor code cosmetic
This commit is contained in:
@ -1119,7 +1119,7 @@ end;
|
|||||||
|
|
||||||
procedure TMainForm.FormDestroy(Sender: TObject);
|
procedure TMainForm.FormDestroy(Sender: TObject);
|
||||||
var
|
var
|
||||||
filename, WinState: String;
|
WinState: String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
// Destroy editors and dialogs. Must be done before connection gets closed, as some destructors do SQL stuff.
|
// Destroy editors and dialogs. Must be done before connection gets closed, as some destructors do SQL stuff.
|
||||||
@ -1730,10 +1730,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// By default, select the host node
|
// By default, select the host node
|
||||||
if not Assigned(DBtree.FocusedNode) then begin
|
if not Assigned(DBtree.FocusedNode) then
|
||||||
DBtree.Selected[DBtree.GetFirst] := true;
|
SelectNode(DBTree, DBtree.GetFirst);
|
||||||
DBtree.FocusedNode := DBtree.GetFirst;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// Create function menu items in popupQuery and popupFilter
|
// Create function menu items in popupQuery and popupFilter
|
||||||
menuQueryInsertFunction.Clear;
|
menuQueryInsertFunction.Clear;
|
||||||
@ -1994,9 +1992,7 @@ var
|
|||||||
Connections: TStringList;
|
Connections: TStringList;
|
||||||
begin
|
begin
|
||||||
// Delete dynamically added connection menu items.
|
// Delete dynamically added connection menu items.
|
||||||
for i := menuConnections.Items.Count - 1 downto 0 do begin
|
menuConnections.Items.Clear;
|
||||||
menuConnections.Items.Delete(i);
|
|
||||||
end;
|
|
||||||
|
|
||||||
// "Session manager" and "New window" items
|
// "Session manager" and "New window" items
|
||||||
item := TMenuItem.Create(menuConnections);
|
item := TMenuItem.Create(menuConnections);
|
||||||
@ -2006,6 +2002,9 @@ begin
|
|||||||
item := TMenuItem.Create(menuConnections);
|
item := TMenuItem.Create(menuConnections);
|
||||||
item.Action := actNewWindow;
|
item.Action := actNewWindow;
|
||||||
menuConnections.Items.Add(item);
|
menuConnections.Items.Add(item);
|
||||||
|
item := TMenuItem.Create(menuConnections);
|
||||||
|
item.Caption := '-';
|
||||||
|
menuConnections.Items.Add(item);
|
||||||
|
|
||||||
// All sessions
|
// All sessions
|
||||||
if MainReg.OpenKey(REGPATH + REGKEY_SESSIONS, False) then begin
|
if MainReg.OpenKey(REGPATH + REGKEY_SESSIONS, False) then begin
|
||||||
|
Reference in New Issue
Block a user