Skip to content

Commit

Permalink
Use helper variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Emdek committed Aug 5, 2024
1 parent 8ff4364 commit 69f2490
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/windows/preferences/InputPreferencesPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,12 @@ void InputPreferencesPage::loadKeyboardDefinitions(const QString &identifier)

for (int i = 0; i < definitions.count(); ++i)
{
const ActionsManager::ActionDefinition action(ActionsManager::getActionDefinition(definitions.at(i).action));
const QString name(ActionsManager::getActionName(definitions.at(i).action));
const int identifier(definitions.at(i).action);
const ActionsManager::ActionDefinition action(ActionsManager::getActionDefinition(identifier));
const QString name(ActionsManager::getActionName(identifier));

addKeyboardShortcuts(m_keyboardShortcutsModel, definitions.at(i).action, name, action.getText(true), action.defaultState.icon, definitions.at(i).parameters, definitions.at(i).shortcuts, false);
addKeyboardShortcuts(m_keyboardShortcutsModel, definitions.at(i).action, name, action.getText(true), action.defaultState.icon, definitions.at(i).parameters, definitions.at(i).disabledShortcuts, true);
addKeyboardShortcuts(m_keyboardShortcutsModel, identifier, name, action.getText(true), action.defaultState.icon, definitions.at(i).parameters, definitions.at(i).shortcuts, false);
addKeyboardShortcuts(m_keyboardShortcutsModel, identifier, name, action.getText(true), action.defaultState.icon, definitions.at(i).parameters, definitions.at(i).disabledShortcuts, true);
}

m_keyboardShortcutsModel->sort(1);
Expand Down

0 comments on commit 69f2490

Please sign in to comment.