Show usage of color before deletion #2127
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the user decided to delete a color that was used by at least one symbol, a warning was issued: "The map contains symbols with this color. Deleting it will remove the color from these objects!".
This warning was however ambiguous: it was even issued when the affected symbol(s) were not used by any object. In addition, the mixture of "symbols" and "these objects" sounded awkward.
With the first commit the number of affected symbols is counted and put out in the warning message.
In addition the number of objects actually using these affected symbols is counted as well. If there is at least one object then the warning is extended by stating the number of affected objects. In any case the message text is changed to "...remove the color from these symbols".
The second commit allows to select the symbols that will be affected by removing a given color by extending the warning message box by a new button 'Select affected symbols and abort'.
Pressing on this button then selects all of the affected symbols in the symbol window.
Warning message when symbols but no objects are affected:
Warning message when symbols and objects are affected:
After pressing on the 'Select affected symbols and abort' button: