Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show usage of color before deletion #2127

Closed
wants to merge 2 commits into from

Conversation

dl3sdo
Copy link
Member

@dl3sdo dl3sdo commented Jan 17, 2023

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:
ColorDeletionSymbols

Warning message when symbols and objects are affected:
ColorDeletionSymbolsObjects
After pressing on the 'Select affected symbols and abort' button:
SelectedSymbols

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 anbiguous: 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 this 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".
This 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.
The SymbolRenderWidget class was extended by selectMultipleSymbols()
to select a number of symbols, this was only possible for a single
symbol before. selectMultipleSymbols() itself is called by the new
method selectMultipleSymbols() in the SymbolWidget class.
Since the ColorListWidget object can neither directly access the
SymbolWidget object nor the parent MapEditorController object which
owns and does provide access to SymbolWidget, MapEditorController now
passes a pointer to himself to ColorListWidget's constructor.

Closes OpenOrienteering#2122
@dl3sdo
Copy link
Member Author

dl3sdo commented Jun 13, 2024

Superseded by #2222

@dl3sdo dl3sdo closed this Jun 13, 2024
@dl3sdo dl3sdo deleted the issue-2122 branch June 13, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant