mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes bounding box hotkey conditions
This commit is contained in:
parent
6a32adb7ed
commit
387f39407a
@ -27,6 +27,7 @@ import {
|
|||||||
setNeedsRepaint,
|
setNeedsRepaint,
|
||||||
toggleShouldLockBoundingBox,
|
toggleShouldLockBoundingBox,
|
||||||
clearImageToInpaint,
|
clearImageToInpaint,
|
||||||
|
setShouldShowBoundingBox,
|
||||||
} from './inpaintingSlice';
|
} from './inpaintingSlice';
|
||||||
|
|
||||||
import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md';
|
import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md';
|
||||||
@ -51,6 +52,7 @@ const InpaintingControls = () => {
|
|||||||
isMaskEmpty,
|
isMaskEmpty,
|
||||||
activeTabName,
|
activeTabName,
|
||||||
showDualDisplay,
|
showDualDisplay,
|
||||||
|
shouldShowBoundingBox
|
||||||
} = useAppSelector(inpaintingControlsSelector);
|
} = useAppSelector(inpaintingControlsSelector);
|
||||||
|
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
@ -160,9 +162,9 @@ const InpaintingControls = () => {
|
|||||||
dispatch(toggleShouldLockBoundingBox());
|
dispatch(toggleShouldLockBoundingBox());
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: activeTabName === 'inpainting' && shouldShowMask,
|
enabled: activeTabName === 'inpainting' && shouldShowMask && shouldShowBoundingBox,
|
||||||
},
|
},
|
||||||
[activeTabName, shouldShowMask]
|
[activeTabName, shouldShowMask, shouldShowBoundingBox]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Undo
|
// Undo
|
||||||
|
@ -88,6 +88,8 @@ const KeyboardEventManager = () => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ' ': {
|
case ' ': {
|
||||||
|
if (!shouldShowMask) break;
|
||||||
|
|
||||||
if (e.type === 'keydown') {
|
if (e.type === 'keydown') {
|
||||||
dispatch(setIsDrawing(false));
|
dispatch(setIsDrawing(false));
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ export const inpaintingControlsSelector = createSelector(
|
|||||||
pastLines,
|
pastLines,
|
||||||
futureLines,
|
futureLines,
|
||||||
shouldShowBoundingBoxFill,
|
shouldShowBoundingBoxFill,
|
||||||
|
shouldShowBoundingBox,
|
||||||
} = inpainting;
|
} = inpainting;
|
||||||
|
|
||||||
const { activeTab, showDualDisplay } = options;
|
const { activeTab, showDualDisplay } = options;
|
||||||
@ -48,6 +49,7 @@ export const inpaintingControlsSelector = createSelector(
|
|||||||
activeTabName: tabMap[activeTab],
|
activeTabName: tabMap[activeTab],
|
||||||
showDualDisplay,
|
showDualDisplay,
|
||||||
shouldShowBoundingBoxFill,
|
shouldShowBoundingBoxFill,
|
||||||
|
shouldShowBoundingBox,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,7 +75,6 @@ export const inpaintingCanvasSelector = createSelector(
|
|||||||
isDrawing,
|
isDrawing,
|
||||||
shouldLockBoundingBox,
|
shouldLockBoundingBox,
|
||||||
shouldShowBoundingBox,
|
shouldShowBoundingBox,
|
||||||
|
|
||||||
} = inpainting;
|
} = inpainting;
|
||||||
return {
|
return {
|
||||||
tool,
|
tool,
|
||||||
|
Loading…
Reference in New Issue
Block a user