File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
invokeai/frontend/web/src/features/controlLayers/store Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2097,14 +2097,21 @@ const syncScaledSize = (canvas: CanvasState) => {
2097
2097
2098
2098
let filter = true ;
2099
2099
2100
+ const nonUndoableActions : string [ ] = [
2101
+ canvasAdded . type ,
2102
+ canvasSelected . type ,
2103
+ canvasNameChanged . type ,
2104
+ canvasDeleted . type ,
2105
+ ] ;
2106
+
2100
2107
const canvasUndoableConfig : UndoableOptions < CanvasesState , UnknownAction > = {
2101
2108
limit : 64 ,
2102
2109
undoType : canvasUndo . type ,
2103
2110
redoType : canvasRedo . type ,
2104
2111
clearHistoryType : canvasClearHistory . type ,
2105
2112
filter : ( action , _state , _history ) => {
2106
- // Ignore all actions from other slices
2107
- if ( ! action . type . startsWith ( slice . name ) ) {
2113
+ // Ignore both all actions from other slices and canvas management actions
2114
+ if ( ! action . type . startsWith ( slice . name ) || ( nonUndoableActions . includes ( action . type ) ) ) {
2108
2115
return false ;
2109
2116
}
2110
2117
// Throttle rapid actions of the same type
You can’t perform that action at this time.
0 commit comments