forked from qt-creator/qt-creator
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user