Issue #932: fix crash with new color setting when switching from query tab to data tab

This commit is contained in:
Ansgar Becker
2021-06-23 08:37:31 +02:00
parent ff9c467f8c
commit 8d949575cd

View File

@@ -6416,11 +6416,13 @@ begin
actCodeFoldingStartRegion.Enabled := InQueryTab;
actCodeFoldingEndRegion.Enabled := InQueryTab;
actCodeFoldingFoldSelection.Enabled := HasSelection;
if HasConnection and (Conn.Parameters.SessionColor <> clNone) then begin
Tab.Memo.Gutter.Color := Conn.Parameters.SessionColor;
end
else begin
Tab.Memo.Gutter.Color := clBtnFace;
if InQueryTab then begin
if HasConnection and (Conn.Parameters.SessionColor <> clNone) then begin
Tab.Memo.Gutter.Color := Conn.Parameters.SessionColor;
end
else begin
Tab.Memo.Gutter.Color := clBtnFace;
end;
end;
end;