diff --git a/src/containers/fill-color-indicator.jsx b/src/containers/fill-color-indicator.jsx index b2fd121c..89068f40 100644 --- a/src/containers/fill-color-indicator.jsx +++ b/src/containers/fill-color-indicator.jsx @@ -24,8 +24,6 @@ class FillColorIndicator extends React.Component { if (fillColorModalVisible && !newProps.fillColorModalVisible) { // Submit the new SVG, which also stores a single undo/redo action. if (this._hasChanged) onUpdateSvg(); - } else if (newProps.fillColorModalVisible && !fillColorModalVisible) { - // If modal is opening, reset the _hasChanged flag to false; this._hasChanged = false; } } diff --git a/src/containers/stroke-color-indicator.jsx b/src/containers/stroke-color-indicator.jsx index 5229289a..dfbaa6e9 100644 --- a/src/containers/stroke-color-indicator.jsx +++ b/src/containers/stroke-color-indicator.jsx @@ -24,8 +24,6 @@ class StrokeColorIndicator extends React.Component { if (strokeColorModalVisible && !newProps.strokeColorModalVisible) { // Submit the new SVG, which also stores a single undo/redo action. if (this._hasChanged) onUpdateSvg(); - } else if (newProps.strokeColorModalVisible && !strokeColorModalVisible) { - // If modal is opening, reset the _hasChanged flag to false; this._hasChanged = false; } } diff --git a/src/helper/style-path.js b/src/helper/style-path.js index 4a1b704d..d7330e25 100644 --- a/src/helper/style-path.js +++ b/src/helper/style-path.js @@ -8,7 +8,7 @@ const MIXED = 'scratch-paint/style-path/mixed'; /** * Called when setting fill color * @param {string} colorString New color, css format - * @return {boolean} Whether the color application actually changed anything. + * @return {boolean} Whether the color application actually changed visibly. */ const applyFillColorToSelection = function (colorString) { const items = getSelectedLeafItems(); @@ -56,7 +56,7 @@ const _strokeColorMatch = function (item, incomingColor) { /** * Called when setting stroke color * @param {string} colorString New color, css format - * @return {boolean} Whether the color application actually changed anything. + * @return {boolean} Whether the color application actually changed visibly. */ const applyStrokeColorToSelection = function (colorString) { const items = getSelectedLeafItems();