mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes send to buttons
This commit is contained in:
parent
ed70fc683c
commit
74485411a8
@ -107,6 +107,7 @@ const CurrentImageButtons = () => {
|
|||||||
shouldShowImageDetails,
|
shouldShowImageDetails,
|
||||||
currentImage,
|
currentImage,
|
||||||
isLightBoxOpen,
|
isLightBoxOpen,
|
||||||
|
activeTabName,
|
||||||
} = useAppSelector(systemSelector);
|
} = useAppSelector(systemSelector);
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
@ -320,10 +321,14 @@ const CurrentImageButtons = () => {
|
|||||||
if (!currentImage) return;
|
if (!currentImage) return;
|
||||||
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
||||||
|
|
||||||
dispatch(setInitialCanvasImage(currentImage));
|
|
||||||
dispatch(setShouldLockToInitialImage(true));
|
dispatch(setShouldLockToInitialImage(true));
|
||||||
|
dispatch(setInitialCanvasImage(currentImage));
|
||||||
dispatch(setDoesCanvasNeedScaling(true));
|
dispatch(setDoesCanvasNeedScaling(true));
|
||||||
|
|
||||||
|
if (activeTabName !== 'unifiedCanvas') {
|
||||||
|
dispatch(setActiveTab('unifiedCanvas'));
|
||||||
|
}
|
||||||
|
|
||||||
toast({
|
toast({
|
||||||
title: 'Sent to Unified Canvas',
|
title: 'Sent to Unified Canvas',
|
||||||
status: 'success',
|
status: 'success',
|
||||||
@ -336,10 +341,14 @@ const CurrentImageButtons = () => {
|
|||||||
if (!currentImage) return;
|
if (!currentImage) return;
|
||||||
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
||||||
|
|
||||||
dispatch(setInitialCanvasImage(currentImage));
|
|
||||||
dispatch(setShouldLockToInitialImage(false));
|
dispatch(setShouldLockToInitialImage(false));
|
||||||
|
dispatch(setInitialCanvasImage(currentImage));
|
||||||
dispatch(setDoesCanvasNeedScaling(true));
|
dispatch(setDoesCanvasNeedScaling(true));
|
||||||
|
|
||||||
|
if (activeTabName !== 'unifiedCanvas') {
|
||||||
|
dispatch(setActiveTab('unifiedCanvas'));
|
||||||
|
}
|
||||||
|
|
||||||
toast({
|
toast({
|
||||||
title: 'Sent to Unified Canvas',
|
title: 'Sent to Unified Canvas',
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
@ -99,8 +99,8 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
const handleSendToInpainting = () => {
|
const handleSendToInpainting = () => {
|
||||||
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
||||||
|
|
||||||
dispatch(setInitialCanvasImage(image));
|
|
||||||
dispatch(setShouldLockToInitialImage(true));
|
dispatch(setShouldLockToInitialImage(true));
|
||||||
|
dispatch(setInitialCanvasImage(image));
|
||||||
dispatch(setDoesCanvasNeedScaling(true));
|
dispatch(setDoesCanvasNeedScaling(true));
|
||||||
|
|
||||||
if (activeTabName !== 'unifiedCanvas') {
|
if (activeTabName !== 'unifiedCanvas') {
|
||||||
@ -118,8 +118,8 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
const handleSendToOutpainting = () => {
|
const handleSendToOutpainting = () => {
|
||||||
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
if (isLightBoxOpen) dispatch(setIsLightBoxOpen(false));
|
||||||
|
|
||||||
|
dispatch(setShouldLockToInitialImage(false));
|
||||||
dispatch(setInitialCanvasImage(image));
|
dispatch(setInitialCanvasImage(image));
|
||||||
dispatch(setShouldLockToInitialImage(true));
|
|
||||||
dispatch(setDoesCanvasNeedScaling(true));
|
dispatch(setDoesCanvasNeedScaling(true));
|
||||||
|
|
||||||
if (activeTabName !== 'unifiedCanvas') {
|
if (activeTabName !== 'unifiedCanvas') {
|
||||||
|
Loading…
Reference in New Issue
Block a user