Allow Kicad Manager frame to particapate in Preferences architecture.

This commit is contained in:
Jeff Young 2019-06-12 13:43:24 +01:00
parent e691704a82
commit 36f09cb29b
3 changed files with 17 additions and 0 deletions

View File

@ -529,6 +529,10 @@ void EDA_BASE_FRAME::OnPreferences( wxCommandEvent& event )
frame->InstallPreferences( &dlg, hotkeysPanel );
}
// The Kicad manager frame is not a player so we have to add it by hand
if( IsType( KICAD_MAIN_FRAME_T ) )
InstallPreferences( &dlg, hotkeysPanel );
if( dlg.ShowModal() == wxID_OK )
dlg.Kiway().CommonSettingsChanged();
}

View File

@ -31,6 +31,7 @@
#include <executable_names.h>
#include <build_version.h>
#include "pgm_kicad.h"
#include <panel_hotkeys_editor.h>
#include "tree_project_frame.h"
#include "kicad_id.h"
#include <tool/tool_manager.h>
@ -480,6 +481,16 @@ void KICAD_MANAGER_FRAME::SaveSettings( wxConfigBase* aCfg )
}
void KICAD_MANAGER_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
PANEL_HOTKEYS_EDITOR* aHotkeysPanel )
{
aHotkeysPanel->AddHotKeys( GetToolManager() );
}
void KICAD_MANAGER_FRAME::PrintPrjInfo()
{
wxString msg = wxString::Format( _( "Project name:\n%s\n" ),

View File

@ -149,6 +149,8 @@ public:
void SyncToolbars() override;
void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
void SetProjectFileName( const wxString& aFullProjectProFileName );
const wxString GetProjectFileName();