mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-16 03:30:50 +08:00
Bugfix: Clicking 'Retry' in the lost connection dialog caused the session manager to pop up, because FormShow() did a lot of stuff. Move everything from FormShow() to FormCreate().
This commit is contained in:
@ -1280,6 +1280,18 @@ var
|
|||||||
fontname, datafontname : String;
|
fontname, datafontname : String;
|
||||||
fontsize, datafontsize : Integer;
|
fontsize, datafontsize : Integer;
|
||||||
DisableProcessWindowsGhostingProc: procedure;
|
DisableProcessWindowsGhostingProc: procedure;
|
||||||
|
|
||||||
|
curParam : Byte;
|
||||||
|
sValue,
|
||||||
|
parHost, parPort, parUser, parPass, parDatabase,
|
||||||
|
parTimeout, parCompress, parSortDatabases, parDescription : String;
|
||||||
|
LastUpdatecheck : TDateTime;
|
||||||
|
UpdatecheckInterval : Integer;
|
||||||
|
DefaultLastrunDate, LastSession: String;
|
||||||
|
frm : TfrmUpdateCheck;
|
||||||
|
dlgResult: Integer;
|
||||||
|
Connected, CommandLineMode: Boolean;
|
||||||
|
ConnForm: TConnForm;
|
||||||
begin
|
begin
|
||||||
caption := APPNAME;
|
caption := APPNAME;
|
||||||
setLocales;
|
setLocales;
|
||||||
@ -1472,26 +1484,10 @@ begin
|
|||||||
'DisableProcessWindowsGhosting');
|
'DisableProcessWindowsGhosting');
|
||||||
if Assigned(DisableProcessWindowsGhostingProc) then
|
if Assigned(DisableProcessWindowsGhostingProc) then
|
||||||
DisableProcessWindowsGhostingProc;
|
DisableProcessWindowsGhostingProc;
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{**
|
{**
|
||||||
Check for connection parameters on commandline or show connections form.
|
Check for connection parameters on commandline or show connections form.
|
||||||
}
|
}
|
||||||
procedure TMainForm.FormShow(Sender: TObject);
|
|
||||||
var
|
|
||||||
curParam : Byte;
|
|
||||||
sValue,
|
|
||||||
parHost, parPort, parUser, parPass, parDatabase,
|
|
||||||
parTimeout, parCompress, parSortDatabases, parDescription : String;
|
|
||||||
LastUpdatecheck : TDateTime;
|
|
||||||
UpdatecheckInterval : Integer;
|
|
||||||
DefaultLastrunDate, LastSession: String;
|
|
||||||
frm : TfrmUpdateCheck;
|
|
||||||
dlgResult: Integer;
|
|
||||||
Connected, CommandLineMode: Boolean;
|
|
||||||
ConnForm: TConnForm;
|
|
||||||
begin
|
|
||||||
// Do an updatecheck if checked in settings
|
// Do an updatecheck if checked in settings
|
||||||
if GetRegValue(REGNAME_DO_UPDATECHECK, DEFAULT_DO_UPDATECHECK) then begin
|
if GetRegValue(REGNAME_DO_UPDATECHECK, DEFAULT_DO_UPDATECHECK) then begin
|
||||||
DefaultLastrunDate := '2000-01-01';
|
DefaultLastrunDate := '2000-01-01';
|
||||||
@ -1593,8 +1589,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
DoAfterConnect;
|
|
||||||
|
|
||||||
if (not CommandLineMode) and (ParamStr(1) <> '') then begin
|
if (not CommandLineMode) and (ParamStr(1) <> '') then begin
|
||||||
// Loading SQL file by command line. Mutually exclusive to connect by command line.
|
// Loading SQL file by command line. Mutually exclusive to connect by command line.
|
||||||
QueryLoad(ParamStr(1));
|
QueryLoad(ParamStr(1));
|
||||||
@ -1603,6 +1597,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMainForm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoAfterConnect;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.actSessionManagerExecute(Sender: TObject);
|
procedure TMainForm.actSessionManagerExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
ConnForm: TConnForm;
|
ConnForm: TConnForm;
|
||||||
@ -5826,6 +5826,7 @@ begin
|
|||||||
TimerHostUptimeTimer(self);
|
TimerHostUptimeTimer(self);
|
||||||
FQueryRunning := false;
|
FQueryRunning := false;
|
||||||
try
|
try
|
||||||
|
FMysqlConn.Connection.Disconnect;
|
||||||
connected := True;
|
connected := True;
|
||||||
try
|
try
|
||||||
// CheckConnected() doesn't really check anything, it
|
// CheckConnected() doesn't really check anything, it
|
||||||
|
Reference in New Issue
Block a user