Add component will unmount to deactivate to all tools ()

This commit is contained in:
DD Liu 2018-09-11 10:35:08 -04:00 committed by GitHub
parent 2b462eb676
commit 45018e4f64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 89 additions and 8 deletions
src/containers

View file

@ -44,6 +44,11 @@ class BitLineMode extends React.Component {
shouldComponentUpdate (nextProps) {
return nextProps.isBitLineModeActive !== this.props.isBitLineModeActive;
}
componentWillUnmount () {
if (this.tool) {
this.deactivateTool();
}
}
activateTool () {
clearSelection(this.props.clearSelectedItems);
this.props.clearGradient();