Fix bugs with ACTIONs not being "honest" singletons.

Delete the copy ctor and assignment operator to start with, but
even then the separate apps each have their own statically allocated
copy of the common actions.  So we need to update all of them, which
also means having the kicad manager frame's set of actions on hand).

This changelist also adds a Clear Hotkey Assignment function since
the hotkeys set is now likely to be sparse with respect to the
actions.
This commit is contained in:
Jeff Young
2019-06-14 16:54:46 +01:00
parent 83ee51370c
commit b429dbfb88
14 changed files with 98 additions and 179 deletions
+4 -4
View File
@@ -105,7 +105,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer )
const BUTTON_ROW_PANEL::BTN_DEF_LIST l_btn_defs = {
{
wxID_RESET,
_( "Reset Hotkeys" ),
_( "Undo All Changes" ),
_( "Undo all changes made so far in this dialog" ),
[this]( wxCommandEvent& ){
m_hotkeyListCtrl->ResetAllHotkeys( false );
@@ -113,7 +113,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer )
},
{
wxID_ANY,
_( "Set to Defaults" ),
_( "Restore All to Defaults" ),
_( "Set all hotkeys to the built-in KiCad defaults" ),
[this]( wxCommandEvent& ){
m_hotkeyListCtrl->ResetAllHotkeys( true );
@@ -184,8 +184,8 @@ void PANEL_HOTKEYS_EDITOR::ImportHotKeys()
{
for( HOTKEY& hotkey: section.m_HotKeys )
{
if( importedHotKeys.count( hotkey.m_Parent->GetName() ) )
hotkey.m_EditKeycode = importedHotKeys[ hotkey.m_Parent->GetName() ];
if( importedHotKeys.count( hotkey.m_Actions[ 0 ]->GetName() ) )
hotkey.m_EditKeycode = importedHotKeys[ hotkey.m_Actions[ 0 ]->GetName() ];
}
}