Fix Bug 44360

This commit is contained in:
ShimaginAndrey 2021-05-31 15:50:56 +03:00
parent 06da18294a
commit a7e8f1812e
2 changed files with 7 additions and 6 deletions

View file

@ -507,9 +507,8 @@ const EditShape = props => {
const storeShapeSettings = props.storeShapeSettings;
const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = storeShapeSettings.getWrapType(shapeObject);
let setDisabled = true;
props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false;
let disableRemove = !!props.storeFocusObjects.paragraphObject;
return (
<Fragment>
@ -542,7 +541,7 @@ const EditShape = props => {
</List>
<List>
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}}
className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} />
className={`button-red button-fill button-raised ${disableRemove ? 'disabled' : ''}`} />
</List>
</Fragment>
)

View file

@ -11,7 +11,8 @@ const EditShape = props => {
const storeFocusObjects = props.storeFocusObjects;
const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
let setDisabled = true;
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
return (
<Fragment>
@ -37,7 +38,8 @@ const EditShape = props => {
}}></ListItem>
</List>
<List className="buttons-list">
<ListItem href="#" className="button button-raised button-red" onClick={props.onRemoveShape}>{_t.textRemoveShape}</ListItem>
<ListItem href="#" className={`button button-raised button-red
${disableRemove ? 'disabled' : ''}`} onClick={props.onRemoveShape}>{_t.textRemoveShape}</ListItem>
</List>
</Fragment>
)