File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
invokeai/frontend/web/src/features/controlLayers/components/InpaintMask Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { createSelector } from '@reduxjs/toolkit' ;
2
2
import { useAppSelector } from 'app/store/storeHooks' ;
3
3
import { CanvasEntitySettingsWrapper } from 'features/controlLayers/components/common/CanvasEntitySettingsWrapper' ;
4
- import { InpaintMaskAddButtons } from 'features/controlLayers/components/InpaintMask/InpaintMaskAddButtons' ;
5
4
import { InpaintMaskDenoiseLimitSlider } from 'features/controlLayers/components/InpaintMask/InpaintMaskDenoiseLimitSlider' ;
6
5
import { InpaintMaskNoiseSlider } from 'features/controlLayers/components/InpaintMask/InpaintMaskNoiseSlider' ;
7
6
import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext' ;
@@ -30,12 +29,15 @@ export const InpaintMaskSettings = memo(() => {
30
29
const hasNoiseLevel = useAppSelector ( selectHasNoiseLevel ) ;
31
30
32
31
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.
33
35
return null ;
34
36
}
35
37
36
38
return (
37
39
< CanvasEntitySettingsWrapper >
38
- { ! hasNoiseLevel && ! hasDenoiseLimit && < InpaintMaskAddButtons /> }
40
+ { /* { !hasNoiseLevel && !hasDenoiseLimit && <InpaintMaskAddButtons />} */ }
39
41
{ hasNoiseLevel && < InpaintMaskNoiseSlider /> }
40
42
{ hasDenoiseLimit && < InpaintMaskDenoiseLimitSlider /> }
41
43
</ CanvasEntitySettingsWrapper >
You can’t perform that action at this time.
0 commit comments