mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): discard all staging images in canvas on escape
This commit is contained in:
parent
b01311813b
commit
b93695b78f
@ -79,6 +79,16 @@ const IAICanvasStagingAreaToolbar = () => {
|
||||
preventDefault: true,
|
||||
});
|
||||
|
||||
useHotkeys(
|
||||
['esc'],
|
||||
() => {
|
||||
handleDiscardStagingArea();
|
||||
},
|
||||
{
|
||||
preventDefault: true,
|
||||
}
|
||||
);
|
||||
|
||||
const { data: imageDTO } = useGetImageDTOQuery(currentStagingAreaImage?.imageName ?? skipToken);
|
||||
|
||||
const handleToggleShouldShowStagingImage = useCallback(() => {
|
||||
@ -165,7 +175,7 @@ const IAICanvasStagingAreaToolbar = () => {
|
||||
colorScheme="invokeBlue"
|
||||
/>
|
||||
<IconButton
|
||||
tooltip={t('unifiedCanvas.discardAll')}
|
||||
tooltip={`${t('unifiedCanvas.discardAll')} (Esc)`}
|
||||
aria-label={t('unifiedCanvas.discardAll')}
|
||||
icon={<PiXBold />}
|
||||
onClick={handleDiscardStagingArea}
|
||||
|
Loading…
Reference in New Issue
Block a user