Fix PDF editor (#5393)

# Description of Changes
PDF editor has been impossible to access since #5169. This fixes the bug
introduced in that which made it impossible to access. The main issue
was the refactor removed the `setLeftPanelView` call.
This commit is contained in:
James Brunton 2026-01-08 09:27:55 +00:00 committed by GitHub
parent 772ed6f52b
commit ef7a3fa933
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1688,17 +1688,12 @@ const PdfTextEditor = ({ onComplete, onError }: BaseToolProps) => {
icon: <DescriptionIcon fontSize="small" />,
component: PdfTextEditorView,
});
setLeftPanelView('toolContent');
setCustomWorkbenchViewData(WORKBENCH_VIEW_ID, latestViewDataRef.current);
return () => {
// Clear backend cache if we were using lazy loading
clearCachedJob(cachedJobIdRef.current);
clearCustomWorkbenchViewData(WORKBENCH_VIEW_ID);
unregisterCustomWorkbenchView(WORKBENCH_VIEW_ID);
};
}, [
registerCustomWorkbenchView,
setCustomWorkbenchViewData,
setLeftPanelView,
viewLabel,
]);