Skip to content

Commit d14e3ea

Browse files
authored
Merge pull request #117 from Rahuljagwani/main
Redo, Undo disabled when no graphs loaded issue #116
2 parents 6613c6d + 05c442c commit d14e3ea

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)