Skip to content

Commit 05c442c

Browse files
committed
Redo, Undo disabled when no graphs loaded
1 parent 6613c6d commit 05c442c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/toolbarActions/toolbarList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const toolbarList = (state, dispatcher) => [
7575
text: 'Undo',
7676
icon: FaUndo,
7777
action: undo,
78-
active: state.undoEnabled,
78+
active: state.undoEnabled && state.curGraphInstance,
7979
visibility: true,
8080
hotkey: 'Ctrl+Z',
8181
},
@@ -84,7 +84,7 @@ const toolbarList = (state, dispatcher) => [
8484
text: 'Redo',
8585
icon: FaRedo,
8686
action: redo,
87-
active: state.redoEnabled,
87+
active: state.redoEnabled && state.curGraphInstance,
8888
visibility: true,
8989
hotkey: 'Ctrl+Shift+Z,Ctrl+Y',
9090
},

0 commit comments

Comments
 (0)