diff --git a/common/dialogs/panel_hotkeys_editor.cpp b/common/dialogs/panel_hotkeys_editor.cpp index 544d03153d..21e0082b95 100644 --- a/common/dialogs/panel_hotkeys_editor.cpp +++ b/common/dialogs/panel_hotkeys_editor.cpp @@ -105,7 +105,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer ) wxID_RESET, _( "Reset Hotkeys" ), _( "Undo all changes made so far in this dialog" ), - [this]( wxCommandEvent ){ + [this]( wxCommandEvent& ){ m_hotkeyListCtrl->ResetAllHotkeys( false ); } }, @@ -113,7 +113,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer ) wxID_ANY, _( "Set to Defaults" ), _( "Set all hotkeys to the built-in KiCad defaults" ), - [this]( wxCommandEvent ){ + [this]( wxCommandEvent& ){ m_hotkeyListCtrl->ResetAllHotkeys( true ); } } @@ -124,7 +124,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer ) wxID_ANY, _( "Import..." ), _( "Import hotkey definitions from an external file, replacing the current values" ), - [this]( wxCommandEvent ){ + [this]( wxCommandEvent& ){ m_frame->ImportHotkeyConfigFromFile( m_hotkeys, m_nickname ); } }, @@ -132,15 +132,15 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer ) wxID_ANY, _( "Export..." ), _( "Export these hotkey definitions to an external file" ), - [this]( wxCommandEvent ){ + [this]( wxCommandEvent& ){ m_frame->ExportHotkeyConfigToFile( m_hotkeys, m_nickname ); } }, }; - auto btnPanel = new BUTTON_ROW_PANEL( this, l_btn_defs, r_btn_defs ); + auto btnPanel = std::make_unique( this, l_btn_defs, r_btn_defs ); - aSizer->Add( btnPanel, 0, wxEXPAND | wxTOP, KIUI::GetStdMargin() ); + aSizer->Add( btnPanel.release(), 0, wxEXPAND | wxTOP, KIUI::GetStdMargin() ); }