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) => {
20962096
20972097let filter = true ;
20982098
2099+ const nonUndoableActions : string [ ] = [
2100+ canvasAdded . type ,
2101+ canvasSelected . type ,
2102+ canvasNameChanged . type ,
2103+ canvasDeleted . type ,
2104+ ] ;
2105+
20992106const canvasUndoableConfig : UndoableOptions < CanvasesState , UnknownAction > = {
21002107 limit : 64 ,
21012108 undoType : canvasUndo . type ,
21022109 redoType : canvasRedo . type ,
21032110 clearHistoryType : canvasClearHistory . type ,
21042111 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 ) ) ) {
21072114 return false ;
21082115 }
21092116 // Throttle rapid actions of the same type
You can’t perform that action at this time.
0 commit comments