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
+2 -5
View File
@@ -361,11 +361,8 @@ int WriteHotKeyConfig( const std::map<std::string, TOOL_ACTION*>& aActionMap )
// Overlay the current app's hotkey definitions onto the map
//
for( const auto& ii : aActionMap )
{
if( ii.second->GetHotKey() )
hotkeys[ ii.first ] = ii.second->GetHotKey();
}
hotkeys[ ii.first ] = ii.second->GetHotKey();
// Write entire hotkey set
//
wxFile file( fn.GetFullPath(), wxFile::OpenMode::write );