Permalink
Browse files

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 eeda3228bfc193fc3f93e5962e7ec943f4f43508
Showing with 2 additions and 1 deletion.
  1. +2 −1 source/tabletools.pas
View
@@ -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);
@@ -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;

0 comments on commit eeda322

Please sign in to comment.