Browse Source
IPC_API: fix crash in PLUGIN_AVAILABILITY_CHANGED event handler
newinvert
qu1ck
2 years ago
Failed to extract signature
2 changed files with
16 additions and
6 deletions
-
pcbnew/pcb_edit_frame.cpp
-
pcbnew/pcb_edit_frame.h
|
|
@ -268,12 +268,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : |
|
|
|
|
|
|
|
#ifdef KICAD_IPC_API
|
|
|
|
wxTheApp->Bind( EDA_EVT_PLUGIN_AVAILABILITY_CHANGED, |
|
|
|
[&]( wxCommandEvent& aEvt ) |
|
|
|
{ |
|
|
|
wxLogTrace( traceApi, "PCB frame: EDA_EVT_PLUGIN_AVAILABILITY_CHANGED" ); |
|
|
|
ReCreateHToolbar(); |
|
|
|
aEvt.Skip(); |
|
|
|
} ); |
|
|
|
&PCB_EDIT_FRAME::onPluginAvailabilityChanged, this ); |
|
|
|
#endif
|
|
|
|
|
|
|
|
m_propertiesPanel = new PCB_PROPERTIES_PANEL( this, this ); |
|
|
@ -539,6 +534,8 @@ PCB_EDIT_FRAME::~PCB_EDIT_FRAME() |
|
|
|
|
|
|
|
#ifdef KICAD_IPC_API
|
|
|
|
Pgm().GetApiServer().DeregisterHandler( m_apiHandler.get() ); |
|
|
|
wxTheApp->Unbind( EDA_EVT_PLUGIN_AVAILABILITY_CHANGED, |
|
|
|
&PCB_EDIT_FRAME::onPluginAvailabilityChanged, this ); |
|
|
|
#endif
|
|
|
|
|
|
|
|
// Close modeless dialogs
|
|
|
@ -2630,3 +2627,12 @@ void PCB_EDIT_FRAME::onCloseModelessBookReporterDialogs( wxCommandEvent& aEvent |
|
|
|
m_footprintDiffDlg = nullptr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#ifdef KICAD_IPC_API
|
|
|
|
void PCB_EDIT_FRAME::onPluginAvailabilityChanged( wxCommandEvent& aEvt ) |
|
|
|
{ |
|
|
|
wxLogTrace( traceApi, "PCB frame: EDA_EVT_PLUGIN_AVAILABILITY_CHANGED" ); |
|
|
|
ReCreateHToolbar(); |
|
|
|
aEvt.Skip(); |
|
|
|
} |
|
|
|
#endif
|
|
|
@ -823,6 +823,10 @@ protected: |
|
|
|
|
|
|
|
void onCloseModelessBookReporterDialogs( wxCommandEvent& aEvent ); |
|
|
|
|
|
|
|
#ifdef KICAD_IPC_API |
|
|
|
void onPluginAvailabilityChanged( wxCommandEvent& aEvt ); |
|
|
|
#endif |
|
|
|
|
|
|
|
public: |
|
|
|
PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer |
|
|
|
|
|
|
|