Use QAction::setShortcut() rather than setShortcuts()
This is simpler and we don't need a list of shortcuts here, as we only allow specifying a single one anyhow. See https://github.com/wxWidgets/wxWidgets/pull/1544
This commit is contained in:
@@ -177,9 +177,7 @@ void wxQtAction::UpdateShortcutsFromLabel(const wxString& text)
|
|||||||
const wxString accelStr = text.AfterFirst('\t');
|
const wxString accelStr = text.AfterFirst('\t');
|
||||||
if ( !accelStr.empty() )
|
if ( !accelStr.empty() )
|
||||||
{
|
{
|
||||||
QList<QKeySequence> shortcuts;
|
setShortcut( QKeySequence( wxQtConvertString(accelStr) ) );
|
||||||
shortcuts.append( QKeySequence( wxQtConvertString(accelStr) ) );
|
|
||||||
setShortcuts( shortcuts );
|
|
||||||
}
|
}
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user