From eae0c142fef38762b5bc782fc6ebd48058136a7b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 1 Jun 2020 16:08:46 +0200 Subject: [PATCH] Eeschema, DIALOG_PLOT_SCHEMATIC: fix incorrect unit of default pen width. The default line width used to set the default pen width is given in mils, and the conversion to iu was missing. Fix also a minor Coverity warning. Fixes #4594 https://gitlab.com/kicad/code/kicad/issues/4594 --- eeschema/dialogs/dialog_plot_schematic.cpp | 3 ++- pcbnew/pcb_plot_params.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index 5ac59f4980..6e4d6771e8 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -119,7 +119,8 @@ void DIALOG_PLOT_SCHEMATIC::initDlg() // Set the default line width (pen width which should be used for // items that do not have a pen size defined (like frame ref) - m_defaultLineWidth.SetValue( cfg->m_Drawing.default_line_thickness ); + // the default line width is stored in mils in config + m_defaultLineWidth.SetValue( Mils2iu( cfg->m_Drawing.default_line_thickness ) ); } // Initialize HPGL specific widgets diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 30c746311b..2058b18614 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -147,6 +147,8 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() // it is a "local" parameter m_skipNPTH_Pads = false; + m_sketchPadLineWidth = Millimeter2iu( 0.1 ); // line width to plot items in outline mode + if( PgmOrNull() ) { SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();