feat(web): Outliner Data menu runs the desktop View operators
Desktop OUTLINER_MT_context_menu_view's Expand/Collapse All, Show Hierarchy and Show One Level now run OUTLINER_OT_expanded_toggle, show_hierarchy and show_one_level[open] on the native tree store through an OUTLINER_VIEW_OPERATION editor-context action. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1529,6 +1529,14 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (edit.action === 'OUTLINER_VIEW_OPERATION') {
|
||||
if (area.nativeLayout?.editorType !== 'OUTLINER' ||
|
||||
!area.regions.some(item => item.kind === 'MAIN' && item.visible) ||
|
||||
!['EXPANDED_TOGGLE', 'SHOW_HIERARCHY', 'SHOW_ONE_LEVEL', 'HIDE_ONE_LEVEL'].includes(edit.operation)) {
|
||||
throw report('EDITOR_LAYOUT_INVALID', 'Native Outliner view operation requires a current visible tree');
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (edit.action === 'OUTLINER_TOGGLE_EXPAND' || edit.action === 'OUTLINER_TREE_SELECT') {
|
||||
const row = area.space?.outliner?.rows.find(item => item.id === edit.rowId);
|
||||
if (area.nativeLayout?.editorType !== 'OUTLINER' ||
|
||||
|
||||
Reference in New Issue
Block a user