Skip to content
Snippets Groups Projects
Commit 61e468a8 authored by con's avatar con
Browse files

Don't override a shortcut's key when setting the default, as for actions.

Setting the default shortcut may only set the current shortcut if that
has not already been set.
parent 6936d5c7
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,8 @@ QList<int> Shortcut::context() const
void Shortcut::setDefaultKeySequence(const QKeySequence &key)
{
setKeySequence(key);
if (m_shortcut->key().isEmpty())
setKeySequence(key);
CommandPrivate::setDefaultKeySequence(key);
}
......@@ -384,7 +385,7 @@ QList<CommandLocation> Action::locations() const
void Action::setDefaultKeySequence(const QKeySequence &key)
{
if(m_action->shortcut().isEmpty())
if (m_action->shortcut().isEmpty())
setKeySequence(key);
CommandPrivate::setDefaultKeySequence(key);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment