Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support grouping by tree node type in "check xyz" menu items on table…
  • Loading branch information
ansgarbecker committed Feb 28, 2017
1 parent e74ccec commit eeda322
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/tabletools.pas
Expand Up @@ -1803,6 +1803,7 @@ procedure TfrmTableTools.CheckAllClick(Sender: TObject);
case TreeObjects.GetNodeLevel(TreeObjects.FocusedNode) of
1: DBNode := TreeObjects.FocusedNode;
2: DBNode := TreeObjects.FocusedNode.Parent;
3: DBNode := TreeObjects.FocusedNode.Parent.Parent;
else raise Exception.Create(_('Unhandled tree level'));
end;
ObjNode := TreeObjects.GetFirstChild(DBNode);
Expand All @@ -1812,7 +1813,7 @@ procedure TfrmTableTools.CheckAllClick(Sender: TObject);
if CheckNone then
TreeObjects.CheckState[ObjNode] := csUncheckedNormal
else begin
if (WantedType = lntNone) or (DBObj.NodeType = WantedType) then
if (WantedType = lntNone) or (DBObj.NodeType = WantedType) or (DBObj.GroupType = WantedType) then
TreeObjects.CheckState[ObjNode] := csCheckedNormal
else
TreeObjects.CheckState[ObjNode] := csUncheckedNormal;
Expand Down

0 comments on commit eeda322

Please sign in to comment.