mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Manually repaint db tree after user fired a USE <db> command, so the icons show the right db as active.
This commit is contained in:
@ -871,6 +871,7 @@ type
|
||||
function ConfirmTabClose(PageIndex: Integer): Boolean;
|
||||
procedure UpdateFilterPanel(Sender: TObject);
|
||||
procedure DBObjectsCleared(Connection: TMySQLConnection; Database: String);
|
||||
procedure DatabaseChanged(Connection: TMySQLConnection; Database: String);
|
||||
procedure DoSearchReplace;
|
||||
procedure UpdateLineCharPanel;
|
||||
procedure PaintColorBar(Value, Max: Extended; TargetCanvas: TCanvas; CellRect: TRect);
|
||||
@ -2770,6 +2771,7 @@ begin
|
||||
Connection := TMySQLConnection.Create(Self);
|
||||
Connection.OnLog := LogSQL;
|
||||
Connection.OnDBObjectsCleared := DBObjectsCleared;
|
||||
Connection.OnDatabaseChanged := DatabaseChanged;
|
||||
Connection.ObjectNamesInSelectedDB := SynSQLSyn1.TableNames;
|
||||
Connection.SessionName := Session;
|
||||
Connection.Parameters := Params;
|
||||
@ -6881,6 +6883,13 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.DatabaseChanged(Connection: TMySQLConnection; Database: String);
|
||||
begin
|
||||
// Immediately force db icons to repaint, so the user sees the active db state
|
||||
DBtree.Repaint;
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.DBtreeDblClick(Sender: TObject);
|
||||
var
|
||||
DBObj: PDBObject;
|
||||
|
Reference in New Issue
Block a user