Performance: call RefreshBackgroundColors only during RefreshSessions and btnSaveClick, not in ListSessionsFocusChanged

This commit is contained in:
Ansgar Becker
2021-06-13 12:11:08 +02:00
parent 28d25e3334
commit 22d7da3ff8

View File

@@ -335,6 +335,8 @@ begin
RefreshSessions(SessNode);
end;
end;
if not Assigned(ParentNode) then
RefreshBackgroundColors;
end;
@@ -494,6 +496,7 @@ begin
FSessionModified := False;
ListSessions.Invalidate;
RefreshBackgroundColors;
ValidateControls;
// Apply session color (and othher settings) to opened connection(s)
@@ -972,7 +975,6 @@ begin
updownKeepAlive.Position := Sess.KeepAlive;
chkLocalTimeZone.Checked := Sess.LocalTimeZone;
chkFullTableStatus.Checked := Sess.FullTableStatus;
RefreshBackgroundColors;
ColorBoxBackgroundColor.Selected := Sess.SessionColor;
editDatabases.Text := Sess.AllDatabasesStr;
comboLibrary.Items := Sess.GetLibraries;