Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change shortcuts
_mark_conflicts
logic to always compare between st…
…rings representations of shortcuts (napari#7124) # References and relevant issues Related to napari#7059 napari#6204 napari#7113 # Description While checking PR napari#7113 I noticed that the mark conflicts logic was not detecting conflicts properly. From what I have checked seems like the action manager shortcuts lists ends up having a mix of `KeyBinding` instances and string representations of `KeyBinding`s. Also, recalling some related work, I think some discussion about the `mark_conflicts` logic was done over PR napari#6204 (https://github.com/napari/napari/pull/6204/files/f2e39a83f64c6720b6b386b98cb999a86c9704fa#r1348933980) and a commit with some changes was also done there (napari@5ffb237). This follows a similar implementation path and does some changes to the conflicts logic to always use a standard string representation to compare shortcuts when looking for conflicts. This also extends the current test that checks the `_mark_conflicts` logic to do the check using the different representations a shortcut could have which are encapsultated by the `KeyBindingLike` type (a `KeyBinding` instance itself, its `str` representation or its `int` representation). Co-authored-by: Kira Evans <contact@kne42.me>
- Loading branch information