Gerbview: fix missing grid initialization at starting.
This commit is contained in:
parent
c3175b45af
commit
9d617502d5
|
@ -287,9 +287,11 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
|
||||
m_auimgr.Update();
|
||||
|
||||
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
|
||||
// Init grid size and visibility
|
||||
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||
|
||||
if( GetCanvas() )
|
||||
GetCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
|
||||
|
||||
|
|
|
@ -133,8 +133,6 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
if( m_LastGridSizeId > ID_POPUP_GRID_LEVEL_0_0_1MM-ID_POPUP_GRID_LEVEL_1000 )
|
||||
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_0_0_1MM-ID_POPUP_GRID_LEVEL_1000;
|
||||
|
||||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||
|
||||
setupTools();
|
||||
ReCreateMenuBar();
|
||||
ReCreateHToolbar();
|
||||
|
@ -211,6 +209,12 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
m_LayersManager->ReFill();
|
||||
m_LayersManager->ReFillRender(); // Update colors in Render after the config is read
|
||||
|
||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||
|
||||
if( GetCanvas() )
|
||||
GetCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
|
||||
|
||||
// Update the checked state of tools
|
||||
SyncToolbars();
|
||||
}
|
||||
|
|
|
@ -1386,13 +1386,16 @@ bool MODULE::BuildPolyCourtyard()
|
|||
|
||||
wxString error_msg;
|
||||
|
||||
#define ARC_ERROR_MAX 0.02 /* error max in mm to approximate a arc by segments */
|
||||
bool success = ConvertOutlineToPolygon( list_front, m_poly_courtyard_front,
|
||||
&error_msg, (unsigned) Millimeter2iu( 0.05 ) );
|
||||
&error_msg,
|
||||
(unsigned) Millimeter2iu( ARC_ERROR_MAX ) );
|
||||
|
||||
if( success )
|
||||
{
|
||||
success = ConvertOutlineToPolygon( list_back, m_poly_courtyard_back,
|
||||
&error_msg, (unsigned) Millimeter2iu( 0.05 ) );
|
||||
&error_msg,
|
||||
(unsigned) Millimeter2iu( ARC_ERROR_MAX ) );
|
||||
}
|
||||
|
||||
if( !error_msg.IsEmpty() )
|
||||
|
|
Loading…
Reference in New Issue