diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx index 7bfb4050fb..a25f6d8c0e 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx @@ -73,6 +73,7 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => { const handleSendToImageToImage = useCallback(() => { dispatch(sentImageToImg2Img()); dispatch(iiLayerAdded(imageDTO)); + dispatch(setActiveTab('generation')); }, [dispatch, imageDTO]); const handleSendToCanvas = useCallback(() => { diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx index f93f48e51b..7241501967 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx @@ -30,6 +30,7 @@ import { PiRulerBold, } from 'react-icons/pi'; import { useGetImageDTOQuery } from 'services/api/endpoints/images'; +import { setActiveTab } from '../../../ui/store/uiSlice'; const selectShouldDisableToolbarButtons = createSelector( selectSystemSlice, @@ -84,6 +85,7 @@ const CurrentImageButtons = () => { } dispatch(sentImageToImg2Img()); dispatch(iiLayerAdded(imageDTO)); + dispatch(setActiveTab('generation')); }, [dispatch, imageDTO]); useHotkeys('shift+i', handleSendToImageToImage, [imageDTO]); diff --git a/invokeai/frontend/web/src/features/parameters/hooks/usePreselectedImage.ts b/invokeai/frontend/web/src/features/parameters/hooks/usePreselectedImage.ts index 20d771d75d..5ddecbd8bc 100644 --- a/invokeai/frontend/web/src/features/parameters/hooks/usePreselectedImage.ts +++ b/invokeai/frontend/web/src/features/parameters/hooks/usePreselectedImage.ts @@ -38,6 +38,7 @@ export const usePreselectedImage = (selectedImage?: { const handleSendToImg2Img = useCallback(() => { if (selectedImageDto) { dispatch(iiLayerAdded(selectedImageDto)); + dispatch(setActiveTab("generation")) } }, [dispatch, selectedImageDto]);