diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx index d9f3c2f..bfb755c 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx @@ -4,6 +4,7 @@ import React from 'react' import AnyCompositeRow from './AnyCompositeRow' import {decideRowByPropType} from './PropWithChildrenRow' import {setCollapsedSheetObjectOrCompoundProp} from '@theatre/studio/panels/SequenceEditorPanel/DopeSheet/setCollapsedSheetObjectOrCompoundProp' +import getStudio from '@theatre/studio/getStudio' const LeftSheetObjectRow: React.VFC<{ leaf: SequenceEditorTree_SheetObject @@ -14,6 +15,14 @@ const LeftSheetObjectRow: React.VFC<{ leaf={leaf} label={leaf.sheetObject.address.objectKey} isCollapsed={leaf.isCollapsed} + toggleSelect={() => { + // set selection to this sheet object on click + getStudio().transaction(({stateEditors}) => { + stateEditors.studio.historic.panels.outline.selection.set([ + leaf.sheetObject, + ]) + }) + }} toggleCollapsed={() => setCollapsedSheetObjectOrCompoundProp(!leaf.isCollapsed, leaf) }