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 @@ -2096,14 +2096,21 @@ const syncScaledSize = (canvas: CanvasState) => {
2096
2096
2097
2097
let filter = true ;
2098
2098
2099
+ const nonUndoableActions : string [ ] = [
2100
+ canvasAdded . type ,
2101
+ canvasSelected . type ,
2102
+ canvasNameChanged . type ,
2103
+ canvasDeleted . type ,
2104
+ ] ;
2105
+
2099
2106
const canvasUndoableConfig : UndoableOptions < CanvasesState , UnknownAction > = {
2100
2107
limit : 64 ,
2101
2108
undoType : canvasUndo . type ,
2102
2109
redoType : canvasRedo . type ,
2103
2110
clearHistoryType : canvasClearHistory . type ,
2104
2111
filter : ( action , _state , _history ) => {
2105
- // Ignore all actions from other slices
2106
- if ( ! action . type . startsWith ( slice . name ) ) {
2112
+ // Ignore both all actions from other slices and canvas management actions
2113
+ if ( ! action . type . startsWith ( slice . name ) || ( nonUndoableActions . includes ( action . type ) ) ) {
2107
2114
return false ;
2108
2115
}
2109
2116
// Throttle rapid actions of the same type
You can’t perform that action at this time.
0 commit comments