diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardContextMenu.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardContextMenu.tsx index 35fcbd87f7..2774288612 100644 --- a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardContextMenu.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardContextMenu.tsx @@ -25,14 +25,17 @@ const BoardContextMenu = memo( const selector = useMemo( () => - createSelector(stateSelector, ({ gallery }) => { + createSelector(stateSelector, ({ gallery, system }) => { const isAutoAdd = gallery.autoAddBoardId === board_id; - return { isAutoAdd }; + const isProcessing = system.isProcessing; + const autoAssignBoardOnClick = gallery.autoAssignBoardOnClick; + return { isAutoAdd, isProcessing, autoAssignBoardOnClick }; }), [board_id] ); - const { isAutoAdd } = useAppSelector(selector); + const { isAutoAdd, isProcessing, autoAssignBoardOnClick } = + useAppSelector(selector); const boardName = useBoardName(board_id); const handleSetAutoAdd = useCallback(() => { @@ -59,7 +62,7 @@ const BoardContextMenu = memo( } - isDisabled={isAutoAdd} + isDisabled={isAutoAdd || isProcessing || autoAssignBoardOnClick} onClick={handleSetAutoAdd} > Auto-add to this Board