Adjust GAL world unit for eeschema
This commit is contained in:
parent
64da77538f
commit
a18be5d37c
|
@ -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 );
|
||||
|
|
|
@ -40,10 +40,6 @@
|
|||
|
||||
using namespace std::placeholders;
|
||||
|
||||
// define our user unit value for GAL ( given in GAL unit = 2.54/(IU per meter))
|
||||
// TODO: move in a header common to sch_draw_panel.cpp
|
||||
#define IU_2_GAL_WORLD_UNIT 2.54/(IU_PER_MM*1000)
|
||||
|
||||
SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL( wxWindow* aParentWindow, wxWindowID aWindowId,
|
||||
const wxPoint& aPosition, const wxSize& aSize,
|
||||
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
|
||||
|
@ -53,7 +49,7 @@ SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL( wxWindow* aParentWindow, wxWindowID aWindo
|
|||
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 ) );
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ class SCH_SHEET;
|
|||
class SCH_SCREEN;
|
||||
class LIB_PART;
|
||||
|
||||
// Eeschema uses mils as the internal units
|
||||
constexpr double SCH_WORLD_UNIT = 0.001;
|
||||
|
||||
static const LAYER_NUM SCH_LAYER_ORDER[] =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue