fix(ui): scaled bbox size synced with optimal dimension

This addresses a case when the user is staging and changes the selected model.
This commit is contained in:
psychedelicious
2024-09-21 22:39:50 +10:00
committed by Kent Keirsey
parent f3f88dba47
commit 21048c53c2

View File

@@ -754,6 +754,10 @@ export const canvasSlice = createSlice({
// and is only called when we are not staging.
const { optimalDimension } = action.payload;
state.bbox.optimalDimension = optimalDimension;
// But! We do want to update the _scaled_ size. This handles the case where the user changes the base model type
// during staging. Though the generation bbox must be unchanged, the scaled bbox should adapt to the model.
syncScaledSize(state);
},
bboxSyncedToOptimalDimension: (state) => {
const { optimalDimension } = state.bbox;