Fix regression: empty Edit > Keyboard Shortcuts > Action Modifiers (fix #4893)

This commit is contained in:
Gaspar Capello 2024-12-23 17:01:43 -03:00 committed by David Capello
parent 912af16453
commit ff0dfb8331
3 changed files with 6 additions and 6 deletions

View File

@ -582,10 +582,10 @@ private:
fillWheelActionsList();
fillDragActionsList();
// Fill the 'Commands' and 'Action Modifier' lists
for (const KeyPtr& key : m_keys) {
if (key->type() == KeyType::Tool || key->type() == KeyType::Quicktool ||
key->type() == KeyType::WheelAction || key->type() == KeyType::DragAction ||
key->isListed()) {
if ((key->type() == KeyType::Command && !key->isCommandListed()) &&
(key->type() != KeyType::Action)) {
continue;
}

View File

@ -131,7 +131,7 @@ public:
const KeyboardShortcuts& globalKeys) const;
bool isPressed() const;
bool isLooselyPressed() const;
bool isListed() const;
bool isCommandListed() const;
bool hasAccel(const ui::Accelerator& accel) const;
bool hasUserDefinedAccels() const;

View File

@ -536,9 +536,9 @@ bool Key::isLooselyPressed() const
return false;
}
bool Key::isListed() const
bool Key::isCommandListed() const
{
return type() != KeyType::Command || !command()->isListed(params());
return type() == KeyType::Command && command()->isListed(params());
}
bool Key::hasAccel(const ui::Accelerator& accel) const