@@ -167,23 +167,19 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (PropertiesProxy)Values[0];
|
||||
int nodeIndex = (int)checkBox.Tag;
|
||||
proxy.NodesMask[nodeIndex] = checkBox.Checked;
|
||||
if(Input.GetKey(KeyboardKeys.Shift))
|
||||
if (Input.GetKey(KeyboardKeys.Shift))
|
||||
SetTreeChecked(checkBox.Parent as TreeNode, checkBox.Checked);
|
||||
proxy.Window.MarkAsEdited();
|
||||
}
|
||||
|
||||
private void SetTreeChecked(TreeNode tree, bool state)
|
||||
{
|
||||
foreach(var node in tree.Children)
|
||||
foreach (var node in tree.Children)
|
||||
{
|
||||
if(node is TreeNode)
|
||||
{
|
||||
SetTreeChecked(node as TreeNode, state);
|
||||
}
|
||||
if(node is CheckBox)
|
||||
{
|
||||
(node as CheckBox).Checked = state;
|
||||
}
|
||||
if (node is TreeNode treeNode)
|
||||
SetTreeChecked(treeNode, state);
|
||||
else if (node is CheckBox checkBox)
|
||||
checkBox.Checked = state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user