diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx
index 81f1b6eb9b..a091104ece 100644
--- a/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx
+++ b/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx
@@ -24,10 +24,9 @@ import {
undo,
setShouldShowMask,
setShouldInvertMask,
- setNeedsRepaint,
+ setNeedsCache,
toggleShouldLockBoundingBox,
clearImageToInpaint,
- setShouldShowBoundingBox,
} from './inpaintingSlice';
import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md';
@@ -284,7 +283,7 @@ const InpaintingControls = () => {
const handleDualDisplay = () => {
dispatch(setShowDualDisplay(!showDualDisplay));
- dispatch(setNeedsRepaint(true));
+ dispatch(setNeedsCache(true));
};
const handleClearImage = () => {
diff --git a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx
index 752dc55641..cfc65e9168 100644
--- a/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx
+++ b/frontend/src/features/tabs/Inpainting/InpaintingDisplay.tsx
@@ -9,15 +9,15 @@ import { OptionsState } from '../../options/optionsSlice';
import InpaintingCanvas from './InpaintingCanvas';
import InpaintingCanvasPlaceholder from './InpaintingCanvasPlaceholder';
import InpaintingControls from './InpaintingControls';
-import { InpaintingState, setNeedsRepaint } from './inpaintingSlice';
+import { InpaintingState, setNeedsCache } from './inpaintingSlice';
const inpaintingDisplaySelector = createSelector(
[(state: RootState) => state.inpainting, (state: RootState) => state.options],
(inpainting: InpaintingState, options: OptionsState) => {
- const { needsRepaint, imageToInpaint } = inpainting;
+ const { needsCache, imageToInpaint } = inpainting;
const { showDualDisplay } = options;
return {
- needsRepaint,
+ needsCache,
showDualDisplay,
imageToInpaint,
};
@@ -31,13 +31,13 @@ const inpaintingDisplaySelector = createSelector(
const InpaintingDisplay = () => {
const dispatch = useAppDispatch();
- const { showDualDisplay, needsRepaint, imageToInpaint } = useAppSelector(
+ const { showDualDisplay, needsCache, imageToInpaint } = useAppSelector(
inpaintingDisplaySelector
);
useLayoutEffect(() => {
const resizeCallback = _.debounce(
- () => dispatch(setNeedsRepaint(true)),
+ () => dispatch(setNeedsCache(true)),
250
);
window.addEventListener('resize', resizeCallback);
@@ -48,7 +48,7 @@ const InpaintingDisplay = () => {
- {needsRepaint ? : }
+ {needsCache ? : }
) : (
diff --git a/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts b/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts
index 4cb49a7704..fe0e12bbed 100644
--- a/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts
+++ b/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts
@@ -48,7 +48,7 @@ export interface InpaintingState {
shouldShowBrush: boolean;
shouldShowBrushPreview: boolean;
imageToInpaint?: InvokeAI.Image;
- needsRepaint: boolean;
+ needsCache: boolean;
stageScale: number;
isDrawing: boolean;
shouldUseInpaintReplace: boolean;
@@ -75,7 +75,7 @@ const initialInpaintingState: InpaintingState = {
shouldShowCheckboardTransparency: false,
shouldShowBrush: true,
shouldShowBrushPreview: false,
- needsRepaint: false,
+ needsCache: false,
isDrawing: false,
stageScale: 1,
shouldUseInpaintReplace: false,
@@ -201,7 +201,7 @@ export const inpaintingSlice = createSlice({
};
state.imageToInpaint = action.payload;
- state.needsRepaint = true;
+ state.needsCache = true;
},
setCanvasDimensions: (state, action: PayloadAction
) => {
state.canvasDimensions = action.payload;
@@ -291,12 +291,12 @@ export const inpaintingSlice = createSlice({
setBoundingBoxPreviewFill: (state, action: PayloadAction) => {
state.boundingBoxPreviewFill = action.payload;
},
- setNeedsRepaint: (state, action: PayloadAction) => {
- state.needsRepaint = action.payload;
+ setNeedsCache: (state, action: PayloadAction) => {
+ state.needsCache = action.payload;
},
setStageScale: (state, action: PayloadAction) => {
state.stageScale = action.payload;
- state.needsRepaint = false;
+ state.needsCache = false;
},
setShouldShowBoundingBoxFill: (state, action: PayloadAction) => {
state.shouldShowBoundingBoxFill = action.payload;
@@ -346,7 +346,7 @@ export const {
setBoundingBoxDimensions,
setBoundingBoxCoordinate,
setBoundingBoxPreviewFill,
- setNeedsRepaint,
+ setNeedsCache,
setStageScale,
toggleTool,
setShouldShowBoundingBoxFill,