mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-15 02:54:07 +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;
|
function ConfirmTabClose(PageIndex: Integer): Boolean;
|
||||||
procedure UpdateFilterPanel(Sender: TObject);
|
procedure UpdateFilterPanel(Sender: TObject);
|
||||||
procedure DBObjectsCleared(Connection: TMySQLConnection; Database: String);
|
procedure DBObjectsCleared(Connection: TMySQLConnection; Database: String);
|
||||||
|
procedure DatabaseChanged(Connection: TMySQLConnection; Database: String);
|
||||||
procedure DoSearchReplace;
|
procedure DoSearchReplace;
|
||||||
procedure UpdateLineCharPanel;
|
procedure UpdateLineCharPanel;
|
||||||
procedure PaintColorBar(Value, Max: Extended; TargetCanvas: TCanvas; CellRect: TRect);
|
procedure PaintColorBar(Value, Max: Extended; TargetCanvas: TCanvas; CellRect: TRect);
|
||||||
@ -2770,6 +2771,7 @@ begin
|
|||||||
Connection := TMySQLConnection.Create(Self);
|
Connection := TMySQLConnection.Create(Self);
|
||||||
Connection.OnLog := LogSQL;
|
Connection.OnLog := LogSQL;
|
||||||
Connection.OnDBObjectsCleared := DBObjectsCleared;
|
Connection.OnDBObjectsCleared := DBObjectsCleared;
|
||||||
|
Connection.OnDatabaseChanged := DatabaseChanged;
|
||||||
Connection.ObjectNamesInSelectedDB := SynSQLSyn1.TableNames;
|
Connection.ObjectNamesInSelectedDB := SynSQLSyn1.TableNames;
|
||||||
Connection.SessionName := Session;
|
Connection.SessionName := Session;
|
||||||
Connection.Parameters := Params;
|
Connection.Parameters := Params;
|
||||||
@ -6881,6 +6883,13 @@ begin
|
|||||||
end;
|
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);
|
procedure TMainForm.DBtreeDblClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
DBObj: PDBObject;
|
DBObj: PDBObject;
|
||||||
|
Reference in New Issue
Block a user