add BOARD_CHANGED and UNITS_CHANGED events
This commit is contained in:
parent
7bf8a744f1
commit
2f1d23312f
|
@ -47,6 +47,8 @@
|
|||
#include <wx/stdpaths.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
wxDEFINE_EVENT( UNITS_CHANGED, wxCommandEvent );
|
||||
|
||||
|
||||
// Minimum window size
|
||||
static const int s_minsize_x = 500;
|
||||
|
@ -738,3 +740,12 @@ bool EDA_BASE_FRAME::IsContentModified()
|
|||
// This function should be overridden in child classes
|
||||
return false;
|
||||
}
|
||||
|
||||
void EDA_BASE_FRAME::ChangeUserUnits( EDA_UNITS aUnits )
|
||||
{
|
||||
SetUserUnits( aUnits );
|
||||
unitsChangeRefresh();
|
||||
|
||||
wxCommandEvent e( UNITS_CHANGED );
|
||||
ProcessEventLocally( e );
|
||||
}
|
||||
|
|
|
@ -88,6 +88,8 @@ enum id_librarytype {
|
|||
LIBRARY_TYPE_SYMBOL
|
||||
};
|
||||
|
||||
wxDECLARE_EVENT( UNITS_CHANGED, wxCommandEvent );
|
||||
|
||||
|
||||
/**
|
||||
* The base frame for deriving all KiCad main window classes.
|
||||
|
@ -209,11 +211,7 @@ public:
|
|||
m_userUnits = aUnits;
|
||||
}
|
||||
|
||||
void ChangeUserUnits( EDA_UNITS aUnits )
|
||||
{
|
||||
SetUserUnits( aUnits );
|
||||
unitsChangeRefresh();
|
||||
}
|
||||
void ChangeUserUnits( EDA_UNITS aUnits );
|
||||
|
||||
SETTINGS_MANAGER* GetSettingsManager() const { return m_settingsManager; }
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@ class PCB_PLOT_PARAMS;
|
|||
class FP_LIB_TABLE;
|
||||
class PCBNEW_SETTINGS;
|
||||
|
||||
|
||||
wxDECLARE_EVENT( BOARD_CHANGED, wxCommandEvent );
|
||||
|
||||
/**
|
||||
* PCB_BASE_FRAME
|
||||
* basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include <tool/tool_dispatcher.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
|
||||
wxDEFINE_EVENT( BOARD_CHANGED, wxCommandEvent );
|
||||
|
||||
BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME )
|
||||
EVT_TOOL( ID_TB_OPTIONS_SHOW_PADS_SKETCH, PCB_BASE_FRAME::OnTogglePadDrawMode )
|
||||
|
@ -158,6 +159,9 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
|
|||
delete m_Pcb;
|
||||
m_Pcb = aBoard;
|
||||
m_Pcb->SetGeneralSettings( m_Settings );
|
||||
|
||||
wxCommandEvent e( BOARD_CHANGED );
|
||||
ProcessEventLocally( e );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue