mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix bug with staging bbox not resetting
This commit is contained in:
parent
cffcf80977
commit
fab7a1d337
@ -29,6 +29,7 @@ import {
|
|||||||
isCanvasMaskLine,
|
isCanvasMaskLine,
|
||||||
} from './canvasTypes';
|
} from './canvasTypes';
|
||||||
import { ImageDTO } from 'services/api';
|
import { ImageDTO } from 'services/api';
|
||||||
|
import { sessionCanceled } from 'services/thunks/session';
|
||||||
|
|
||||||
export const initialLayerState: CanvasLayerState = {
|
export const initialLayerState: CanvasLayerState = {
|
||||||
objects: [],
|
objects: [],
|
||||||
@ -844,6 +845,13 @@ export const canvasSlice = createSlice({
|
|||||||
state.isTransformingBoundingBox = false;
|
state.isTransformingBoundingBox = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
extraReducers: (builder) => {
|
||||||
|
builder.addCase(sessionCanceled.pending, (state) => {
|
||||||
|
if (!state.layerState.stagingArea.images.length) {
|
||||||
|
state.layerState.stagingArea = initialLayerState.stagingArea;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
Loading…
Reference in New Issue
Block a user