mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
switch to generation tab when someone sends to img2img
This commit is contained in:
parent
6c768bfe7e
commit
5820579237
@ -73,6 +73,7 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
|
||||
const handleSendToImageToImage = useCallback(() => {
|
||||
dispatch(sentImageToImg2Img());
|
||||
dispatch(iiLayerAdded(imageDTO));
|
||||
dispatch(setActiveTab('generation'));
|
||||
}, [dispatch, imageDTO]);
|
||||
|
||||
const handleSendToCanvas = useCallback(() => {
|
||||
|
@ -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]);
|
||||
|
@ -38,6 +38,7 @@ export const usePreselectedImage = (selectedImage?: {
|
||||
const handleSendToImg2Img = useCallback(() => {
|
||||
if (selectedImageDto) {
|
||||
dispatch(iiLayerAdded(selectedImageDto));
|
||||
dispatch(setActiveTab("generation"))
|
||||
}
|
||||
}, [dispatch, selectedImageDto]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user