Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific tasks when necessary.
This commit is contained in:
@@ -124,7 +124,6 @@ void EDA_BASE_FRAME::commonInit( FRAME_T aFrameType )
|
||||
m_supportsAutoSave = false;
|
||||
m_autoSaveState = false;
|
||||
m_undoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS;
|
||||
m_userUnits = EDA_UNITS::MILLIMETRES;
|
||||
m_isClosing = false;
|
||||
m_isNonUserClose = false;
|
||||
m_autoSaveTimer = new wxTimer( this, ID_AUTO_SAVE_TIMER );
|
||||
@@ -153,21 +152,14 @@ void EDA_BASE_FRAME::commonInit( FRAME_T aFrameType )
|
||||
}
|
||||
|
||||
|
||||
EDA_BASE_FRAME::EDA_BASE_FRAME( FRAME_T aFrameType, KIWAY* aKiway ) :
|
||||
wxFrame(),
|
||||
TOOLS_HOLDER(),
|
||||
KIWAY_HOLDER( aKiway, KIWAY_HOLDER::FRAME )
|
||||
{
|
||||
commonInit( aFrameType );
|
||||
}
|
||||
|
||||
|
||||
EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
|
||||
const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
|
||||
long aStyle, const wxString& aFrameName, KIWAY* aKiway ) :
|
||||
EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle,
|
||||
const wxPoint& aPos, const wxSize& aSize, long aStyle,
|
||||
const wxString& aFrameName, KIWAY* aKiway,
|
||||
const EDA_IU_SCALE& aIuScale ) :
|
||||
wxFrame( aParent, wxID_ANY, aTitle, aPos, aSize, aStyle, aFrameName ),
|
||||
TOOLS_HOLDER(),
|
||||
KIWAY_HOLDER( aKiway, KIWAY_HOLDER::FRAME )
|
||||
KIWAY_HOLDER( aKiway, KIWAY_HOLDER::FRAME ),
|
||||
UNITS_PROVIDER( aIuScale, EDA_UNITS::MILLIMETRES )
|
||||
{
|
||||
commonInit( aFrameType );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user