Skip to content
Permalink
Browse files

Apply just modified session color to opened connection(s) after save. C…

…loses #745
  • Loading branch information
ansgarbecker committed Dec 11, 2019
1 parent a40fd22 commit 7e256647af2f26ee6632e568a8fa7e5d90d1d1a4
Showing with 9 additions and 0 deletions.
  1. +9 −0 source/connections.pas
@@ -376,6 +376,7 @@ procedure Tconnform.btnOpenClick(Sender: TObject);
procedure Tconnform.btnSaveClick(Sender: TObject);
var
Sess: PConnectionParameters;
Conn: TDBConnection;
begin
// Overtake edited values for current parameter object and save to registry
Sess := ListSessions.GetNodeData(ListSessions.FocusedNode);
@@ -415,6 +416,14 @@ procedure Tconnform.btnSaveClick(Sender: TObject);
FSessionModified := False;
ListSessions.Invalidate;
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;


0 comments on commit 7e25664

Please sign in to comment.
You can’t perform that action at this time.