fix: Shortcuts acting as duplicates in settings

This commit is contained in:
WerWolv
2024-12-16 20:26:04 +01:00
parent 313e59d7f9
commit bb99b9a0ef
3 changed files with 29 additions and 5 deletions

View File

@@ -181,6 +181,8 @@ namespace hex {
bool isLocal() const;
std::string toString() const;
const std::set<Key>& getKeys() const;
bool has(Key key) const;
bool matches(const Shortcut &other) const;
private:
friend Shortcut operator+(const Key &lhs, const Key &rhs);
@@ -258,7 +260,7 @@ namespace hex {
[[nodiscard]] static std::vector<ShortcutEntry> getGlobalShortcuts();
[[nodiscard]] static std::vector<ShortcutEntry> getViewShortcuts(const View *view);
[[nodiscard]] static bool updateShortcut(Shortcut oldShortcut, Shortcut newShortcut, View *view = nullptr);
[[nodiscard]] static bool updateShortcut(const Shortcut &oldShortcut, Shortcut newShortcut, View *view = nullptr);
};
}