diff --git a/common/widgets/widget_hotkey_list.cpp b/common/widgets/widget_hotkey_list.cpp index af7d759f8f..55cd903e1c 100644 --- a/common/widgets/widget_hotkey_list.cpp +++ b/common/widgets/widget_hotkey_list.cpp @@ -308,10 +308,17 @@ void WIDGET_HOTKEY_LIST::UpdateFromClientData() if( hkdata ) { - const EDA_HOTKEY& hk = hkdata->GetChangedHotkey().GetCurrentValue(); + const auto& changed_hk = hkdata->GetChangedHotkey(); + const EDA_HOTKEY& hk = changed_hk.GetCurrentValue(); + + wxString key_text = KeyNameFromKeyCode( hk.m_KeyCode ); + + // mark unsaved changes + if( changed_hk.HasUnsavedChange() ) + key_text += " *"; SetItemText( i, 0, wxGetTranslation( hk.m_InfoMsg ) ); - SetItemText( i, 1, KeyNameFromKeyCode( hk.m_KeyCode ) ); + SetItemText( i, 1, key_text); } } } diff --git a/include/hotkey_store.h b/include/hotkey_store.h index cbeb58d347..b025ce8915 100644 --- a/include/hotkey_store.h +++ b/include/hotkey_store.h @@ -71,6 +71,15 @@ public: m_orig = m_changed; } + /** + * @brief Return true if the hotkey doesn't match the original (i.e. it + * has been changed) + */ + bool HasUnsavedChange() const + { + return m_orig.m_KeyCode != m_changed.m_KeyCode; + } + const wxString& GetSectionTag() const { return m_tag;