public void RemoveFromSelection(IBuilderSelectionNotifier source, VisualElement ve) { m_Selection.Remove(ve); BuilderAssetUtilities.RemoveElementFromSelectionInAsset(m_PaneWindow.document, ve); NotifyOfSelectionChange(source); }
public void ClearSelection(IBuilderSelectionNotifier source, bool undo = true) { if (isEmpty) { return; } if (undo) { foreach (var sel in m_Selection) { BuilderAssetUtilities.RemoveElementFromSelectionInAsset(m_PaneWindow.document, sel); } } m_Selection.Clear(); NotifyOfSelectionChange(source); }
public void Select(IBuilderSelectionNotifier source, VisualElement ve) { if (ve == null) { return; } foreach (var sel in m_Selection) { if (sel == null) { continue; } BuilderAssetUtilities.RemoveElementFromSelectionInAsset(m_PaneWindow.document, sel); } m_Selection.Clear(); m_Selection.Add(ve); BuilderAssetUtilities.AddElementToSelectionInAsset(m_PaneWindow.document, ve); NotifyOfSelectionChange(source); }