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:
con
2009-07-09 12:13:47 +02:00
parent 6936d5c7d6
commit 61e468a885

View File

@@ -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);
}