diff --git a/common/page_layout/ws_draw_item.cpp b/common/page_layout/ws_draw_item.cpp index ef81612bbf..5b7953f098 100644 --- a/common/page_layout/ws_draw_item.cpp +++ b/common/page_layout/ws_draw_item.cpp @@ -448,10 +448,6 @@ const EDA_RECT WS_DRAW_ITEM_BITMAP::GetBoundingBox() const auto* bitmap = static_cast( m_peer ); wxSize bm_size = bitmap->m_ImageBitmap->GetSize(); - // bm_size is in Eeschema unit (100nm), convert to iu (0.001 mm) - bm_size.x /= 10; - bm_size.y /= 10; - EDA_RECT bbox; bbox.SetSize( bm_size ); bbox.SetOrigin( m_pos.x - bm_size.x/2, m_pos.y - bm_size.y/2 ); diff --git a/pagelayout_editor/pl_draw_panel_gal.cpp b/pagelayout_editor/pl_draw_panel_gal.cpp index c35a4f48cb..1aa015e61f 100644 --- a/pagelayout_editor/pl_draw_panel_gal.cpp +++ b/pagelayout_editor/pl_draw_panel_gal.cpp @@ -107,6 +107,7 @@ void PL_DRAW_PANEL_GAL::DisplayWorksheet() dummy.SetPaperFormat( &m_edaFrame->GetPageSettings().GetType() ); dummy.SetTitleBlock( &m_edaFrame->GetTitleBlock() ); dummy.SetProject( &m_edaFrame->Prj() ); + dummy.SetMilsToIUfactor( IU_PER_MILS ); for( WS_DATA_ITEM* dataItem : model.GetItems() ) dataItem->SyncDrawItems( &dummy, m_view ); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 6d4cf27be8..51b63761f2 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -850,7 +850,7 @@ WS_DATA_ITEM* PL_EDITOR_FRAME::AddPageLayoutItem( int aType ) } // Set the scale factor for pl_editor (it is set for eeschema by default) - image->SetPixelSizeIu( 25400.0 / image->GetPPI() ); + image->SetPixelSizeIu( IU_PER_MILS * 1000.0 / image->GetPPI() ); item = new WS_DATA_ITEM_BITMAP( image ); } break;