Merge pull request #1022 from apple502j/paint-swap-stage

Update sprite when gradient colors are swapped
This commit is contained in:
DD Liu 2020-05-12 15:39:24 -04:00 committed by GitHub
commit 62e39c2f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,10 +91,11 @@ class FillColorIndicator extends React.Component {
}
handleSwap () {
if (getSelectedLeafItems().length) {
swapColorsInSelection(
const isDifferent = swapColorsInSelection(
isBitmap(this.props.format),
this.props.textEditTarget);
this.props.setSelectedItems();
this._hasChanged = this._hasChanged || isDifferent;
} else {
let color1 = this.props.fillColor;
let color2 = this.props.fillColor2;