mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Remove save button from Canvas Controls (cleanup)
This commit is contained in:
parent
775f032c56
commit
7f0fb47cf3
@ -13,16 +13,11 @@ import { createSelector } from '@reduxjs/toolkit';
|
|||||||
import {
|
import {
|
||||||
outpaintingCanvasSelector,
|
outpaintingCanvasSelector,
|
||||||
OutpaintingCanvasState,
|
OutpaintingCanvasState,
|
||||||
uploadOutpaintingMergedImage,
|
|
||||||
} from './canvasSlice';
|
} from './canvasSlice';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
|
import { RootState } from 'app/store';
|
||||||
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
import { activeTabNameSelector } from 'features/options/optionsSelectors';
|
||||||
import { OptionsState } from 'features/options/optionsSlice';
|
import { OptionsState } from 'features/options/optionsSlice';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import IAICanvasImageEraserControl from './IAICanvasControls/IAICanvasImageEraserControl';
|
|
||||||
import { canvasImageLayerRef } from './IAICanvas';
|
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
|
||||||
import { FaSave } from 'react-icons/fa';
|
|
||||||
|
|
||||||
export const canvasControlsSelector = createSelector(
|
export const canvasControlsSelector = createSelector(
|
||||||
[
|
[
|
||||||
@ -52,15 +47,11 @@ export const canvasControlsSelector = createSelector(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const IAICanvasControls = () => {
|
const IAICanvasControls = () => {
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const { activeTabName } = useAppSelector(canvasControlsSelector);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="inpainting-settings">
|
<div className="inpainting-settings">
|
||||||
<ButtonGroup isAttached={true}>
|
<ButtonGroup isAttached={true}>
|
||||||
<IAICanvasBrushControl />
|
<IAICanvasBrushControl />
|
||||||
<IAICanvasEraserControl />
|
<IAICanvasEraserControl />
|
||||||
{activeTabName === 'outpainting' && <IAICanvasImageEraserControl />}
|
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
<ButtonGroup isAttached={true}>
|
<ButtonGroup isAttached={true}>
|
||||||
<IAICanvasMaskVisibilityControl />
|
<IAICanvasMaskVisibilityControl />
|
||||||
@ -69,15 +60,6 @@ const IAICanvasControls = () => {
|
|||||||
<IAICanvasShowHideBoundingBoxControl />
|
<IAICanvasShowHideBoundingBoxControl />
|
||||||
<IAICanvasMaskClear />
|
<IAICanvasMaskClear />
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
<IAIIconButton
|
|
||||||
aria-label="Save"
|
|
||||||
tooltip="Save"
|
|
||||||
icon={<FaSave />}
|
|
||||||
onClick={() => {
|
|
||||||
dispatch(uploadOutpaintingMergedImage(canvasImageLayerRef));
|
|
||||||
}}
|
|
||||||
fontSize={20}
|
|
||||||
/>
|
|
||||||
<ButtonGroup isAttached={true}>
|
<ButtonGroup isAttached={true}>
|
||||||
<IAICanvasUndoControl />
|
<IAICanvasUndoControl />
|
||||||
<IAICanvasRedoControl />
|
<IAICanvasRedoControl />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user