private void manageSelectedNodes(ITreeNode selectedNode = null, bool canClearSelection = true) { this.DoWithinLatch(() => { var multiSelectAllowed = _presenter.AllowMultiSelectFor(selectedNodes.Union(new[] { selectedNode })); //valid multi select. Nothing to do if (multiSelectAllowed && isMultiSelectModifier(ModifierKeys)) { return; } // Not a valid multiselect scenario or clear allowed, just do it if (!multiSelectAllowed || canClearSelection) { resetTreeViewSelection(); } }); }