From af5905a3e6571d0e9a6973cc4104ba7972299ff8 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Tue, 12 Nov 2024 11:45:20 -0800 Subject: [PATCH] refactor!: Add setSelectedItem() to IToolbox. (#8650) --- core/interfaces/i_toolbox.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/interfaces/i_toolbox.ts b/core/interfaces/i_toolbox.ts index a236d4442..e45bc6c04 100644 --- a/core/interfaces/i_toolbox.ts +++ b/core/interfaces/i_toolbox.ts @@ -94,7 +94,7 @@ export interface IToolbox extends IRegistrable { setVisible(isVisible: boolean): void; /** - * Selects the toolbox item by it's position in the list of toolbox items. + * Selects the toolbox item by its position in the list of toolbox items. * * @param position The position of the item to select. */ @@ -107,6 +107,14 @@ export interface IToolbox extends IRegistrable { */ getSelectedItem(): IToolboxItem | null; + /** + * Sets the selected item. + * + * @param item The toolbox item to select, or null to remove the current + * selection. + */ + setSelectedItem(item: IToolboxItem | null): void; + /** Disposes of this toolbox. */ dispose(): void; }