bugfix: treemode was being ignored.

when depth or branching value was being ignored, treemode value was
reset, and desynced with the checkbox input