Skip to content

Commit

Permalink
Apply just modified session color to opened connection(s) after save. C…
Browse files Browse the repository at this point in the history
…loses #745
  • Loading branch information
ansgarbecker committed Dec 11, 2019
1 parent a40fd22 commit 7e25664
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/connections.pas
Expand Up @@ -376,6 +376,7 @@ procedure Tconnform.btnOpenClick(Sender: TObject);
procedure Tconnform.btnSaveClick(Sender: TObject); procedure Tconnform.btnSaveClick(Sender: TObject);
var var
Sess: PConnectionParameters; Sess: PConnectionParameters;
Conn: TDBConnection;
begin begin
// Overtake edited values for current parameter object and save to registry // Overtake edited values for current parameter object and save to registry
Sess := ListSessions.GetNodeData(ListSessions.FocusedNode); Sess := ListSessions.GetNodeData(ListSessions.FocusedNode);
Expand Down Expand Up @@ -415,6 +416,14 @@ procedure Tconnform.btnSaveClick(Sender: TObject);
FSessionModified := False; FSessionModified := False;
ListSessions.Invalidate; ListSessions.Invalidate;
ValidateControls; ValidateControls;

// Apply session color (and othher settings) to opened connection(s)
for Conn in MainForm.Connections do begin
if Conn.Parameters.SessionPath = Sess.SessionPath then begin
Conn.Parameters.SessionColor := Sess.SessionColor;
MainForm.DBtree.Repaint;
end;
end;
end; end;




Expand Down

0 comments on commit 7e25664

Please sign in to comment.