mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes undo/redo
This commit is contained in:
parent
d5467e7db5
commit
3f1360368d
@ -35,12 +35,12 @@ export default function IAICanvasRedoButton() {
|
|||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
['meta+shift+z', 'control+shift+z', 'control+y', 'meta+y'],
|
['meta+shift+z', 'control+shift+z', 'control+y', 'meta+y'],
|
||||||
(e: KeyboardEvent) => {
|
() => {
|
||||||
e.preventDefault();
|
|
||||||
handleRedo();
|
handleRedo();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: canRedo,
|
enabled: () => canRedo,
|
||||||
|
preventDefault: true,
|
||||||
},
|
},
|
||||||
[activeTabName, canRedo]
|
[activeTabName, canRedo]
|
||||||
);
|
);
|
||||||
|
@ -36,12 +36,12 @@ export default function IAICanvasUndoButton() {
|
|||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
['meta+z', 'control+z'],
|
['meta+z', 'control+z'],
|
||||||
(e: KeyboardEvent) => {
|
() => {
|
||||||
e.preventDefault();
|
|
||||||
handleUndo();
|
handleUndo();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: canUndo,
|
enabled: () => canUndo,
|
||||||
|
preventDefault: true,
|
||||||
},
|
},
|
||||||
[activeTabName, canUndo]
|
[activeTabName, canUndo]
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user