|
|
@ -60,10 +60,6 @@ BEGIN_EVENT_TABLE( SCH_DRAW_PANEL, wxScrolledCanvas ) |
|
|
|
// EVT_MENU_RANGE( ID_PAN_UP, ID_PAN_RIGHT, EDA_DRAW_PANEL::OnPan )
|
|
|
|
END_EVENT_TABLE() |
|
|
|
|
|
|
|
// define our user unit value for GAL ( given in GAL unit = 2.54/(IU per meter))
|
|
|
|
// TODO: move in a header common to sch_preview_panel.cpp
|
|
|
|
#define IU_2_GAL_WORLD_UNIT 2.54/(IU_PER_MM*1000)
|
|
|
|
|
|
|
|
SCH_DRAW_PANEL::SCH_DRAW_PANEL( wxWindow* aParentWindow, wxWindowID aWindowId, |
|
|
|
const wxPoint& aPosition, const wxSize& aSize, |
|
|
|
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) : |
|
|
@ -75,7 +71,7 @@ SCH_DRAW_PANEL::SCH_DRAW_PANEL( wxWindow* aParentWindow, wxWindowID aWindowId, |
|
|
|
m_view = new KIGFX::SCH_VIEW( true ); |
|
|
|
m_view->SetGAL( m_gal ); |
|
|
|
|
|
|
|
m_gal->SetWorldUnitLength( IU_2_GAL_WORLD_UNIT ); |
|
|
|
m_gal->SetWorldUnitLength( SCH_WORLD_UNIT ); |
|
|
|
|
|
|
|
m_painter.reset( new KIGFX::SCH_PAINTER( m_gal ) ); |
|
|
|
|
|
|
@ -191,7 +187,7 @@ bool SCH_DRAW_PANEL::SwitchBackend( GAL_TYPE aGalType ) |
|
|
|
VECTOR2D grid_size = m_gal->GetGridSize(); |
|
|
|
bool rv = EDA_DRAW_PANEL_GAL::SwitchBackend( aGalType ); |
|
|
|
setDefaultLayerDeps(); |
|
|
|
m_gal->SetWorldUnitLength( IU_2_GAL_WORLD_UNIT ); |
|
|
|
m_gal->SetWorldUnitLength( SCH_WORLD_UNIT ); |
|
|
|
|
|
|
|
// Keep grid size and grid visibility:
|
|
|
|
m_gal->SetGridSize( grid_size ); |
|
|
|