mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): reset initial image when resetting canvas
This commit is contained in:
parent
4341ed7ab4
commit
9bc57a6f59
@ -1,5 +1,5 @@
|
|||||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||||
import { createSlice } from '@reduxjs/toolkit';
|
import { createAction, createSlice } from '@reduxjs/toolkit';
|
||||||
import type { PersistConfig, RootState } from 'app/store/store';
|
import type { PersistConfig, RootState } from 'app/store/store';
|
||||||
import { deepClone } from 'common/util/deepClone';
|
import { deepClone } from 'common/util/deepClone';
|
||||||
import { bboxReducers } from 'features/controlLayers/store/bboxReducers';
|
import { bboxReducers } from 'features/controlLayers/store/bboxReducers';
|
||||||
@ -172,6 +172,7 @@ export const canvasV2Slice = createSlice({
|
|||||||
state.session = deepClone(initialState.session);
|
state.session = deepClone(initialState.session);
|
||||||
state.tool = deepClone(initialState.tool);
|
state.tool = deepClone(initialState.tool);
|
||||||
state.inpaintMask = deepClone(initialState.inpaintMask);
|
state.inpaintMask = deepClone(initialState.inpaintMask);
|
||||||
|
state.initialImage = deepClone(initialState.initialImage);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -386,3 +387,5 @@ export const canvasV2PersistConfig: PersistConfig<CanvasV2State> = {
|
|||||||
migrate,
|
migrate,
|
||||||
persistDenylist: [],
|
persistDenylist: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const sessionRequested = createAction(`${canvasV2Slice.name}/sessionRequested`);
|
||||||
|
Loading…
Reference in New Issue
Block a user