Change to Viewer mode when Read tool selected (#4317)

# Description of Changes
Change it so that when you select the Read tool, the Viewer is
automatically selected.
This commit is contained in:
James Brunton 2025-08-29 13:28:15 +01:00 committed by GitHub
parent cf771075f4
commit 7c9769f5b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,8 +138,12 @@ export function ToolWorkflowProvider({ children }: ToolWorkflowProviderProps) {
}, []);
const setReaderMode = useCallback((mode: boolean) => {
if (mode) {
actions.setWorkbench('viewer');
actions.setSelectedTool('read');
}
dispatch({ type: 'SET_READER_MODE', payload: mode });
}, []);
}, [actions]);
const setPreviewFile = useCallback((file: File | null) => {
dispatch({ type: 'SET_PREVIEW_FILE', payload: file });