Skip to content

Commit

Permalink
Issue #932: fix crash with new color setting when switching from quer…
Browse files Browse the repository at this point in the history
…y tab to data tab
  • Loading branch information
ansgarbecker committed Jun 23, 2021
1 parent ff9c467 commit 8d94957
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions source/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6416,11 +6416,13 @@ procedure TMainForm.ValidateQueryControls(Sender: TObject);
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;
Expand Down

0 comments on commit 8d94957

Please sign in to comment.