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