Re-add event handler for the menu events generated on macOS
macOS' application menu generates command events and can't call our tool framework directly, so we have to keep the event table handlers around to handle these events.
This commit is contained in:
parent
a3a701a95e
commit
54759389de
|
@ -100,7 +100,9 @@ static const wxSize defaultSize( FRAME_T aFrameType )
|
|||
|
||||
|
||||
BEGIN_EVENT_TABLE( EDA_BASE_FRAME, wxFrame )
|
||||
// These event table entries are needed to handle events from the mac application menu
|
||||
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::OnKicadAbout )
|
||||
EVT_MENU( wxID_PREFERENCES, EDA_BASE_FRAME::OnPreferences )
|
||||
|
||||
EVT_CHAR_HOOK( EDA_BASE_FRAME::OnCharHook )
|
||||
EVT_MENU_OPEN( EDA_BASE_FRAME::OnMenuEvent )
|
||||
|
@ -1048,6 +1050,12 @@ void EDA_BASE_FRAME::OnKicadAbout( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void EDA_BASE_FRAME::OnPreferences( wxCommandEvent& event )
|
||||
{
|
||||
ShowPreferences( wxEmptyString, wxEmptyString );
|
||||
}
|
||||
|
||||
|
||||
void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParentPage )
|
||||
{
|
||||
wxBeginBusyCursor( wxHOURGLASS_CURSOR );
|
||||
|
|
|
@ -209,7 +209,9 @@ public:
|
|||
|
||||
virtual wxString help_name();
|
||||
|
||||
// Event handlers for menu events generated by the macOS application menu
|
||||
void OnKicadAbout( wxCommandEvent& event );
|
||||
void OnPreferences( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Displays the preferences and settings of all opened editors paged dialog, starting with
|
||||
|
|
Loading…
Reference in New Issue