diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index df88fd5090..6b0f094ec2 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -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 ); diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index 25d3b0aef6..60592369b9 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -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. diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index da9662fedf..a8cc2a78d3 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -137,6 +137,8 @@ bool DIALOG_SET_GRID::TransferDataFromWindow() mgr->ProcessEvent( gridOriginUpdate ); } + m_parent->UpdateGridSelectBox(); + return wxDialog::TransferDataFromWindow(); } diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index f6342d1e01..36ffbd45fc 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -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(); diff --git a/pcbnew/tool_footprint_editor.cpp b/pcbnew/tool_footprint_editor.cpp index 77102002ea..fc252b6663 100644 --- a/pcbnew/tool_footprint_editor.cpp +++ b/pcbnew/tool_footprint_editor.cpp @@ -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 ); diff --git a/pcbnew/tool_footprint_viewer.cpp b/pcbnew/tool_footprint_viewer.cpp index 40acbe9e4b..1011a5d58c 100644 --- a/pcbnew/tool_footprint_viewer.cpp +++ b/pcbnew/tool_footprint_viewer.cpp @@ -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 ); diff --git a/pcbnew/tool_pcb_editor.cpp b/pcbnew/tool_pcb_editor.cpp index 37db99a4ea..d6f6ecc544 100644 --- a/pcbnew/tool_pcb_editor.cpp +++ b/pcbnew/tool_pcb_editor.cpp @@ -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