fixes #2505 add preserve masked to status text

This commit is contained in:
psychedelicious 2023-02-08 21:52:17 +11:00 committed by blessedcoolant
parent 1d62b4210f
commit 77c11a42ee

View File

@ -23,6 +23,7 @@ const selector = createSelector(
shouldShowCanvasDebugInfo, shouldShowCanvasDebugInfo,
layer, layer,
boundingBoxScaleMethod, boundingBoxScaleMethod,
shouldPreserveMaskedArea,
} = canvas; } = canvas;
let boundingBoxColor = 'inherit'; let boundingBoxColor = 'inherit';
@ -56,6 +57,7 @@ const selector = createSelector(
shouldShowCanvasDebugInfo, shouldShowCanvasDebugInfo,
shouldShowBoundingBox: boundingBoxScaleMethod !== 'auto', shouldShowBoundingBox: boundingBoxScaleMethod !== 'auto',
shouldShowScaledBoundingBox: boundingBoxScaleMethod !== 'none', shouldShowScaledBoundingBox: boundingBoxScaleMethod !== 'none',
shouldPreserveMaskedArea,
}; };
}, },
{ {
@ -79,6 +81,7 @@ const IAICanvasStatusText = () => {
canvasScaleString, canvasScaleString,
shouldShowCanvasDebugInfo, shouldShowCanvasDebugInfo,
shouldShowBoundingBox, shouldShowBoundingBox,
shouldPreserveMaskedArea,
} = useAppSelector(selector); } = useAppSelector(selector);
const { t } = useTranslation(); const { t } = useTranslation();
@ -91,6 +94,15 @@ const IAICanvasStatusText = () => {
}} }}
>{`${t('unifiedcanvas:activeLayer')}: ${activeLayerString}`}</div> >{`${t('unifiedcanvas:activeLayer')}: ${activeLayerString}`}</div>
<div>{`${t('unifiedcanvas:canvasScale')}: ${canvasScaleString}%`}</div> <div>{`${t('unifiedcanvas:canvasScale')}: ${canvasScaleString}%`}</div>
{shouldPreserveMaskedArea && (
<div
style={{
color: 'var(--status-working-color)',
}}
>
Preserve Masked Area: On
</div>
)}
{shouldShowBoundingBox && ( {shouldShowBoundingBox && (
<div <div
style={{ style={{