Update grid drop-down when changing user grid.
This commit is contained in:
parent
f05b756ccf
commit
647fa6547d
|
@ -307,7 +307,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar()
|
|||
// Grid selection choice box.
|
||||
m_gridSelectBox = new wxChoice( m_mainToolBar, ID_ON_GRID_SELECT,
|
||||
wxDefaultPosition, wxDefaultSize, 0, NULL );
|
||||
updateGridSelectBox();
|
||||
UpdateGridSelectBox();
|
||||
m_mainToolBar->AddControl( m_gridSelectBox );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
|
|
@ -79,7 +79,6 @@ protected:
|
|||
|
||||
PCB_GENERAL_SETTINGS m_configSettings;
|
||||
|
||||
void updateGridSelectBox();
|
||||
void updateZoomSelectBox();
|
||||
virtual void unitsChangeRefresh() override;
|
||||
|
||||
|
@ -206,6 +205,8 @@ public:
|
|||
|
||||
PCB_SCREEN* GetScreen() const override { return (PCB_SCREEN*) EDA_DRAW_FRAME::GetScreen(); }
|
||||
|
||||
void UpdateGridSelectBox();
|
||||
|
||||
/**
|
||||
* Function BestZoom
|
||||
* @return the "best" zoom to show the entire board or footprint on the screen.
|
||||
|
|
|
@ -137,6 +137,8 @@ bool DIALOG_SET_GRID::TransferDataFromWindow()
|
|||
mgr->ProcessEvent( gridOriginUpdate );
|
||||
}
|
||||
|
||||
m_parent->UpdateGridSelectBox();
|
||||
|
||||
return wxDialog::TransferDataFromWindow();
|
||||
}
|
||||
|
||||
|
|
|
@ -914,7 +914,7 @@ void PCB_BASE_FRAME::unitsChangeRefresh()
|
|||
{
|
||||
EDA_DRAW_FRAME::unitsChangeRefresh(); // Update the status bar.
|
||||
|
||||
updateGridSelectBox();
|
||||
UpdateGridSelectBox();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1012,7 +1012,7 @@ const wxString PCB_BASE_FRAME::GetZoomLevelIndicator() const
|
|||
}
|
||||
|
||||
|
||||
void PCB_BASE_FRAME::updateGridSelectBox()
|
||||
void PCB_BASE_FRAME::UpdateGridSelectBox()
|
||||
{
|
||||
UpdateStatusBar();
|
||||
DisplayUnitsMsg();
|
||||
|
|
|
@ -117,7 +117,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar()
|
|||
// Grid selection choice box.
|
||||
m_gridSelectBox = new wxChoice( m_mainToolBar, ID_ON_GRID_SELECT,
|
||||
wxDefaultPosition, wxDefaultSize, 0, NULL );
|
||||
updateGridSelectBox();
|
||||
UpdateGridSelectBox();
|
||||
m_mainToolBar->AddControl( m_gridSelectBox );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
|
|
@ -104,7 +104,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar()
|
|||
// Grid selection choice box.
|
||||
m_gridSelectBox = new wxChoice( m_mainToolBar, ID_ON_GRID_SELECT,
|
||||
wxDefaultPosition, wxDefaultSize, 0, NULL );
|
||||
updateGridSelectBox();
|
||||
UpdateGridSelectBox();
|
||||
m_mainToolBar->AddControl( m_gridSelectBox );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
|
|
@ -613,7 +613,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
|
|||
ID_ON_GRID_SELECT,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL );
|
||||
updateGridSelectBox();
|
||||
UpdateGridSelectBox();
|
||||
m_auxiliaryToolBar->AddControl( m_gridSelectBox );
|
||||
|
||||
// Add the box to display and select the current Zoom
|
||||
|
|
Loading…
Reference in New Issue