From b34a307936b63b0ea9a2e13ffb6cdc15ac73e5de Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 21 Aug 2019 05:13:18 -0700 Subject: [PATCH] pcbnew: Scale line width for import The line width in the import dialog is meant to reflect the resulting width and not the given width of the file. Fixes: lp:1831496 * https://bugs.launchpad.net/kicad/+bug/1831496 (cherry picked from commit 22fdc7f51f62a56dc3aa899f037912af60755c16) --- pcbnew/import_gfx/dialog_import_gfx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/import_gfx/dialog_import_gfx.cpp b/pcbnew/import_gfx/dialog_import_gfx.cpp index 45c853a733..83171e343e 100644 --- a/pcbnew/import_gfx/dialog_import_gfx.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx.cpp @@ -320,7 +320,8 @@ bool DIALOG_IMPORT_GFX::TransferDataFromWindow() m_importer->SetImportOffsetMM( m_origin ); m_scaleImport = DoubleValueFromString( UNSCALED_UNITS, m_textCtrlImportScale->GetValue() ); - m_importer->SetLineWidthMM( m_lineWidth ); + // The line width is meant to be in pcbnew units, so we scale the import width before applying + m_importer->SetLineWidthMM( m_lineWidth * m_scaleImport ); m_importer->SetPlugin( std::move( plugin ) ); LOCALE_IO dummy; // Ensure floats can be read.