Skip to content

Commit ff751f1

Browse files
feat(ui): inpaint mask settings layout
1 parent bf1a39a commit ff751f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

invokeai/frontend/web/src/features/controlLayers/components/InpaintMask/InpaintMaskSettings.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { createSelector } from '@reduxjs/toolkit';
22
import { useAppSelector } from 'app/store/storeHooks';
33
import { CanvasEntitySettingsWrapper } from 'features/controlLayers/components/common/CanvasEntitySettingsWrapper';
4-
import { InpaintMaskAddButtons } from 'features/controlLayers/components/InpaintMask/InpaintMaskAddButtons';
54
import { InpaintMaskDenoiseLimitSlider } from 'features/controlLayers/components/InpaintMask/InpaintMaskDenoiseLimitSlider';
65
import { InpaintMaskNoiseSlider } from 'features/controlLayers/components/InpaintMask/InpaintMaskNoiseSlider';
76
import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext';
@@ -30,12 +29,15 @@ export const InpaintMaskSettings = memo(() => {
3029
const hasNoiseLevel = useAppSelector(selectHasNoiseLevel);
3130

3231
if (!hasNoiseLevel && !hasDenoiseLimit) {
32+
// If we show the <InpaintMaskAddButtons /> below, we can remove this check.
33+
// Until then, if there are no sliders to show for the mask settings, return null. This prevents rendering an
34+
// empty settings wrapper div, which adds unnecessary space in the UI.
3335
return null;
3436
}
3537

3638
return (
3739
<CanvasEntitySettingsWrapper>
38-
{!hasNoiseLevel && !hasDenoiseLimit && <InpaintMaskAddButtons />}
40+
{/* {!hasNoiseLevel && !hasDenoiseLimit && <InpaintMaskAddButtons />} */}
3941
{hasNoiseLevel && <InpaintMaskNoiseSlider />}
4042
{hasDenoiseLimit && <InpaintMaskDenoiseLimitSlider />}
4143
</CanvasEntitySettingsWrapper>

0 commit comments

Comments
 (0)