diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index cc95b80552..c68ff492ee 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -382,8 +382,20 @@ public: virtual void ActivateGalCanvas() override; + /** + * Add \a aListener to post #EDA_EVT_BOARD_CHANGED command events to. + * + * @warning The caller is reponsible for removing any listeners that are no long valid. + * + * @note This only gets called when the board editor is in stand alone mode. Changing + * projects in the project manager closes the board editor when a new project is + * loaded. + */ void AddBoardChangeListener( wxEvtHandler* aListener ); + /** + * Remove \a aListener to from the board changed listener list. + */ void RemoveBoardChangeListener( wxEvtHandler* aListener ); protected: diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 3ba6237c56..af4c11db71 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -234,6 +234,8 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard, PROGRESS_REPORTER* aReporter ) { wxCHECK2( listener, continue ); + // Use the windows variant when handling event messages in case there is any special + // event handler pre and/or post processing specific to windows. wxWindow* win = dynamic_cast( listener ); if( win )