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:
Vadim Zeitlin
2019-09-27 13:47:54 +02:00
parent 3a918864f9
commit 8339f12636

View File

@@ -179,7 +179,7 @@ void wxQtAction::UpdateShortcutsFromLabel(const wxString& text)
if ( index != -1 )
{
QList<QKeySequence> shortcuts = m_qtAction->shortcuts();
QList<QKeySequence> shortcuts;
QString shortcut_key = qlabel.remove( 0, index+1 );
shortcuts.append( QKeySequence( shortcut_key ) );