Skip to content
Permalink
Browse files

Fix crash, caused by a previous commit for #793

  • Loading branch information
ansgarbecker committed Feb 6, 2020
1 parent c6ee86e commit 35ceadb3fcc700ea60df116929f3939493897035
Showing with 4 additions and 2 deletions.
  1. +4 −2 source/main.pas
@@ -9344,7 +9344,7 @@ procedure TMainForm.AnyGridNewText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Results: TDBQuery;
RowNum: PInt64;
Timestamp: Int64;
IsNull, AllowEdit: Boolean;
IsNull: Boolean;
begin
Results := GridResult(Sender);
if not Results.IsEditable then
@@ -12723,9 +12723,11 @@ procedure TMainForm.RefreshHelperNode(NodeIndex: Cardinal);
OldStates: TVirtualNodeStates;
OldCheckState: TCheckState;
ExpandedChildren: TStringList;
Conn: TDBConnection;
begin
if not Assigned(QueryTabs) then
Exit;
Conn := ActiveConnection;
for Tab in QueryTabs do begin
Node := FindNode(Tab.treeHelpers, NodeIndex, nil);
// Store node + children states
@@ -12746,7 +12748,7 @@ procedure TMainForm.RefreshHelperNode(NodeIndex: Cardinal);
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
if (NodeIndex = HELPERNODE_PROFILE) and (Conn <> nil) and (not Conn.Parameters.IsMySQL) then begin
Tab.treeHelpers.CheckState[Node] := csUncheckedNormal;
end;
// Do not check expansion state of children unless the parent node is expanded, to avoid

0 comments on commit 35ceadb

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