From a6c85a920417deed588a8fd7107c24bed054aa84 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 11 Jan 2022 18:34:35 +0100 Subject: [PATCH] 3D viewer: fix a truncation taht created PCB_TEXTs with 0 width (not visible) Fixes #10377 https://gitlab.com/kicad/code/kicad/issues/10377 --- 3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp index b8a52c58df..fd7d03db12 100644 --- a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp +++ b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp @@ -59,7 +59,7 @@ void BOARD_ADAPTER::addShape( const PCB_TEXT* aText, CONTAINER_2D_BASE* aDstCont { KIGFX::GAL_DISPLAY_OPTIONS empty_opts; KIFONT::FONT* font = aText->GetDrawFont(); - int penWidth = aText->GetEffectiveTextPenWidth() * m_biuTo3Dunits; + float penWidth = aText->GetEffectiveTextPenWidth() * m_biuTo3Dunits; CALLBACK_GAL callback_gal( empty_opts, // Stroke callback