Skip to content
Browse files

Uncheck query profile checkbox when switching to a non-MySQL connecti…

…on. Closes #793
  • Loading branch information
ansgarbecker committed Feb 6, 2020
1 parent ec31a25 commit 568e1a6d8bd68b04ff4f32a21ccb4247a222720e
Showing with 5 additions and 0 deletions.
  1. +5 −0 source/main.pas
@@ -8636,6 +8636,7 @@ procedure TMainForm.DBtreeFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualN
if (PrevDBObj = nil) or (PrevDBObj.Connection <> FActiveDbObj.Connection) then begin
LogSQL(f_('Entering session "%s"', [FActiveDbObj.Connection.Parameters.SessionPath]), lcInfo);
case FActiveDbObj.Connection.Parameters.NetTypeGroup of
SynSQLSynUsed.SQLDialect := sqlMySQL;
@@ -12740,6 +12741,10 @@ procedure TMainForm.RefreshHelperNode(NodeIndex: Cardinal);
// Restore old node + children states
Tab.treeHelpers.CheckState[Node] := OldCheckState;
Tab.treeHelpers.Expanded[Node] := vsExpanded in OldStates;
// Disable profiling when not on MySQL
if (NodeIndex = HELPERNODE_PROFILE) and (not FActiveDbObj.Connection.Parameters.IsMySQL) then begin
Tab.treeHelpers.CheckState[Node] := csUncheckedNormal;
// Do not check expansion state of children unless the parent node is expanded, to avoid
// initializing children when not required. Accesses registry items when doing so.
if Tab.treeHelpers.Expanded[Node] then begin

0 comments on commit 568e1a6

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