Update grid drop-down when changing user grid.

This commit is contained in:
Jeff Young 2018-11-23 23:33:02 +00:00
parent f05b756ccf
commit 647fa6547d
7 changed files with 10 additions and 7 deletions

View File

@ -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 );

View File

@ -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.

View File

@ -137,6 +137,8 @@ bool DIALOG_SET_GRID::TransferDataFromWindow()
mgr->ProcessEvent( gridOriginUpdate );
}
m_parent->UpdateGridSelectBox();
return wxDialog::TransferDataFromWindow();
}

View File

@ -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();

View File

@ -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 );

View File

@ -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 );

View File

@ -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