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,
|
||||
toggleShouldLockBoundingBox,
|
||||
clearImageToInpaint,
|
||||
setShouldShowBoundingBox,
|
||||
} from './inpaintingSlice';
|
||||
|
||||
import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md';
|
||||
@ -51,6 +52,7 @@ const InpaintingControls = () => {
|
||||
isMaskEmpty,
|
||||
activeTabName,
|
||||
showDualDisplay,
|
||||
shouldShowBoundingBox
|
||||
} = useAppSelector(inpaintingControlsSelector);
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
@ -160,9 +162,9 @@ const InpaintingControls = () => {
|
||||
dispatch(toggleShouldLockBoundingBox());
|
||||
},
|
||||
{
|
||||
enabled: activeTabName === 'inpainting' && shouldShowMask,
|
||||
enabled: activeTabName === 'inpainting' && shouldShowMask && shouldShowBoundingBox,
|
||||
},
|
||||
[activeTabName, shouldShowMask]
|
||||
[activeTabName, shouldShowMask, shouldShowBoundingBox]
|
||||
);
|
||||
|
||||
// Undo
|
||||
|
@ -88,6 +88,8 @@ const KeyboardEventManager = () => {
|
||||
break;
|
||||
}
|
||||
case ' ': {
|
||||
if (!shouldShowMask) break;
|
||||
|
||||
if (e.type === 'keydown') {
|
||||
dispatch(setIsDrawing(false));
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ export const inpaintingControlsSelector = createSelector(
|
||||
pastLines,
|
||||
futureLines,
|
||||
shouldShowBoundingBoxFill,
|
||||
shouldShowBoundingBox,
|
||||
} = inpainting;
|
||||
|
||||
const { activeTab, showDualDisplay } = options;
|
||||
@ -48,6 +49,7 @@ export const inpaintingControlsSelector = createSelector(
|
||||
activeTabName: tabMap[activeTab],
|
||||
showDualDisplay,
|
||||
shouldShowBoundingBoxFill,
|
||||
shouldShowBoundingBox,
|
||||
};
|
||||
},
|
||||
{
|
||||
@ -73,7 +75,6 @@ export const inpaintingCanvasSelector = createSelector(
|
||||
isDrawing,
|
||||
shouldLockBoundingBox,
|
||||
shouldShowBoundingBox,
|
||||
|
||||
} = inpainting;
|
||||
return {
|
||||
tool,
|
||||
|
Loading…
Reference in New Issue
Block a user