From 0cb7c3dc7dee414856917955053da0a30450329e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 10 Jan 2015 12:08:12 +0100 Subject: [PATCH] ModEdit: fix incorrect size of the toolbar grid size combo box --- pcbnew/tool_modedit.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index 7fbf541ed3..c3819d1bb7 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -38,12 +38,6 @@ #include #include -#ifdef __UNIX__ -#define LISTBOX_WIDTH 140 -#else -#define LISTBOX_WIDTH 120 -#endif - void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar() { @@ -266,9 +260,10 @@ void FOOTPRINT_EDIT_FRAME::ReCreateAuxiliaryToolbar() m_gridSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ), + wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + // Update tool bar to reflect setting. + updateGridSelectBox(); m_auxiliaryToolBar->AddControl( m_gridSelectBox ); // Zoom selection choice box. @@ -276,14 +271,10 @@ void FOOTPRINT_EDIT_FRAME::ReCreateAuxiliaryToolbar() m_zoomSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_ZOOM_SELECT, wxEmptyString, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ), + wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); - m_auxiliaryToolBar->AddControl( m_zoomSelectBox ); - - // Update tool bar to reflect setting. - updateGridSelectBox(); updateZoomSelectBox(); + m_auxiliaryToolBar->AddControl( m_zoomSelectBox ); // after adding the buttons to the toolbar, must call Realize() to reflect the changes m_auxiliaryToolBar->Realize();