Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only update default colors when needed, and
update()
when it's done
With commit 7c5d544, it became possible that `update_colors()` may run without being immediately followed by an `update()`. But `update_colors()` creates a new `metadata_set`, which means `attr_list` may now contain out-of-date metadata indices to the old cleared `metadata_set`. With this commit: * A `metadata_set` is only cleared and recreated in `update_colors()` if default colors have actually changed. * A `bool` is returned and set it to `true` from `update_colors()` if a color update happened. * An `update()` is run if we get a `true` from `update_colors()`. * And finally, `update_colors()` is renamed to `update_default_colors()`. Fixes #291. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
- Loading branch information