[freqtbl-] Allow renaming of count column in Frequency Table #2348
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.
Previously, if the count column was renamed, the entire sheet would fail to draw.
What was happening was that drawColHeader was using
sheet.column()
to grab the Column objects that needed a sort icon added to them. Since this commit the'count'
column name was being added to_ordering
. When the column got renamed,sheet.column()
could not find a column named 'count', and it issued avd.fail()
.This PR includes two changes:
drawColHeader
will silently not add a sort icon if it is unable to find a column by its string. I am open to adding a warning message, I just thought it might be noisy with the rate of draw cycles._ordering
instead of its name. This allows it to keep its sort-icon even if it gets renamed.