Remove old shortcuts when setting new accelerator
Setting a new accelerator should replace the old one, not add to it. See https://github.com/wxWidgets/wxWidgets/pull/1544
This commit is contained in:
@@ -179,7 +179,7 @@ void wxQtAction::UpdateShortcutsFromLabel(const wxString& text)
|
|||||||
|
|
||||||
if ( index != -1 )
|
if ( index != -1 )
|
||||||
{
|
{
|
||||||
QList<QKeySequence> shortcuts = m_qtAction->shortcuts();
|
QList<QKeySequence> shortcuts;
|
||||||
QString shortcut_key = qlabel.remove( 0, index+1 );
|
QString shortcut_key = qlabel.remove( 0, index+1 );
|
||||||
|
|
||||||
shortcuts.append( QKeySequence( shortcut_key ) );
|
shortcuts.append( QKeySequence( shortcut_key ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user