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,
|
preventDefault: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useHotkeys(
|
||||||
|
['esc'],
|
||||||
|
() => {
|
||||||
|
handleDiscardStagingArea();
|
||||||
|
},
|
||||||
|
{
|
||||||
|
preventDefault: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const { data: imageDTO } = useGetImageDTOQuery(currentStagingAreaImage?.imageName ?? skipToken);
|
const { data: imageDTO } = useGetImageDTOQuery(currentStagingAreaImage?.imageName ?? skipToken);
|
||||||
|
|
||||||
const handleToggleShouldShowStagingImage = useCallback(() => {
|
const handleToggleShouldShowStagingImage = useCallback(() => {
|
||||||
@ -165,7 +175,7 @@ const IAICanvasStagingAreaToolbar = () => {
|
|||||||
colorScheme="invokeBlue"
|
colorScheme="invokeBlue"
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
tooltip={t('unifiedCanvas.discardAll')}
|
tooltip={`${t('unifiedCanvas.discardAll')} (Esc)`}
|
||||||
aria-label={t('unifiedCanvas.discardAll')}
|
aria-label={t('unifiedCanvas.discardAll')}
|
||||||
icon={<PiXBold />}
|
icon={<PiXBold />}
|
||||||
onClick={handleDiscardStagingArea}
|
onClick={handleDiscardStagingArea}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user