From bfe2fbf99101fe2749dd898bc20c21f1186751f9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Oct 2019 09:14:45 +0200 Subject: [PATCH] Fix uninitialized variables. especially BOARD_DESIGN_SETTINGS::m_HoleToHoleMin was not initialized, but used in pcbnew when creating a new board --- pcbnew/board_design_settings.cpp | 1 + pcbnew/dialogs/dialog_create_array.cpp | 1 + .../dialogs/panel_modedit_display_options.h | 2 +- .../panel_setup_feature_constraints_base.fbp | 3390 ++++++++--------- 4 files changed, 1698 insertions(+), 1696 deletions(-) diff --git a/pcbnew/board_design_settings.cpp b/pcbnew/board_design_settings.cpp index 918fdaa051..ea3160bd95 100644 --- a/pcbnew/board_design_settings.cpp +++ b/pcbnew/board_design_settings.cpp @@ -495,6 +495,7 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() : m_MicroViasMinSize = Millimeter2iu( DEFAULT_MICROVIASMINSIZE ); m_MicroViasMinDrill = Millimeter2iu( DEFAULT_MICROVIASMINDRILL ); m_CopperEdgeClearance = Millimeter2iu( DEFAULT_COPPEREDGECLEARANCE ); + m_HoleToHoleMin = Millimeter2iu( DEFAULT_HOLETOHOLEMIN ); m_MaxError = ARC_HIGH_DEF; m_ZoneUseNoOutlineInFill = false; // Use compatibility mode by default diff --git a/pcbnew/dialogs/dialog_create_array.cpp b/pcbnew/dialogs/dialog_create_array.cpp index e7c9c3df2d..f157e24255 100644 --- a/pcbnew/dialogs/dialog_create_array.cpp +++ b/pcbnew/dialogs/dialog_create_array.cpp @@ -67,6 +67,7 @@ struct CREATE_ARRAY_DIALOG_ENTRIES m_circAngle( 0.0 ), m_circCount( 4 ), m_circNumberingStartSet( 1 ), // use specified start + m_gridCircNumScheme( 0 ), m_circNumberingOffset( "1" ), m_circNumberingStep( 1 ), m_circRotate( false ), diff --git a/pcbnew/dialogs/panel_modedit_display_options.h b/pcbnew/dialogs/panel_modedit_display_options.h index 128ebdf913..86b309a18a 100644 --- a/pcbnew/dialogs/panel_modedit_display_options.h +++ b/pcbnew/dialogs/panel_modedit_display_options.h @@ -30,7 +30,7 @@ class PAGED_DIALOG; class PANEL_MODEDIT_DISPLAY_OPTIONS : public wxPanel { public: - PANEL_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_FRAME* aParent, PAGED_DIALOG* aWindow ); + PANEL_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_FRAME* aFrame, PAGED_DIALOG* aParent ); private: bool TransferDataToWindow() override; diff --git a/pcbnew/dialogs/panel_setup_feature_constraints_base.fbp b/pcbnew/dialogs/panel_setup_feature_constraints_base.fbp index b90409a09f..cbc585e37d 100644 --- a/pcbnew/dialogs/panel_setup_feature_constraints_base.fbp +++ b/pcbnew/dialogs/panel_setup_feature_constraints_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -16,9 +16,9 @@ none 1 panel_setup_feature_constraints_base - + . - + 1 1 1 @@ -29,57 +29,57 @@ 0 wxAUI_MGR_DEFAULT - - + + 1 1 impl_virtual - - + + 0 wxID_ANY - - + + PANEL_SETUP_FEATURE_CONSTRAINTS_BASE - + -1,-1 ; forward_declare - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxHORIZONTAL none @@ -88,7 +88,7 @@ wxEXPAND|wxRIGHT|wxLEFT 0 - + sbFeatureRules wxVERTICAL none @@ -101,83 +101,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Allow blind/buried vias - + 0 - - + + 0 - + 1 m_OptAllowBlindBuriedVias 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -189,83 +189,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Allow micro vias (uVias) - + 0 - - + + 0 - + 1 m_OptAllowMicroVias 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -287,83 +287,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Require courtyard definitions in footprints - + 0 - - + + 0 - + 1 m_OptRequireCourtyards 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -375,83 +375,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Prohibit overlapping courtyards - + 0 - - + + 0 - + 1 m_OptOverlappingCourtyards 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -469,7 +469,7 @@ wxEXPAND|wxTOP 0 - + bSizerArcToPoly wxVERTICAL none @@ -482,76 +482,76 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline2 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL ; ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -563,78 +563,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,-1,70,0 0 0 wxID_ANY Arc/circle drawing - + 0 - - + + 0 - + 1 m_stCircleToPolyOpt 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -645,9 +645,9 @@ 4 wxBOTH 2 - + 0 - + fgSizer2 wxFLEX_GROWMODE_SPECIFIED none @@ -672,78 +672,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Maximum deviation: - + 0 - - + + 0 - + 1 m_maxErrorTitle 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 This is the maximum distance between a circle and the polygonal shape that approximate it. The error max defines the number of segments of this polygon. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -755,86 +755,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_maxErrorCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - + wxString wxFILTER_NUMERIC wxTextValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -846,78 +846,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_maxErrorUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -929,7 +929,7 @@ wxEXPAND|wxTOP 0 - + m_bSizerPolygonFillOption wxVERTICAL protected @@ -942,76 +942,76 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline1 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL ; ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1023,78 +1023,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,-1,70,0 0 0 wxID_ANY Zone fill strategy - + 0 - - + + 0 - + 1 m_stZoneFilledPolysOpt 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1102,7 +1102,7 @@ wxEXPAND|wxLEFT 1 - + bSizer5 wxVERTICAL none @@ -1115,83 +1115,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Stroked outlines (legacy) - + 0 - - + + 0 - + 1 m_cbOutlinePolygonBestQ 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + onChangeOutlineOpt - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1203,83 +1203,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Smoothed polygons (best performance) - + 0 - - + + 0 - + 1 m_cbOutlinePolygonFastest 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + onChangeOutlineOpt - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1303,7 +1303,7 @@ wxEXPAND|wxRIGHT|wxLEFT 0 - + sbFeatureConstraints wxVERTICAL none @@ -1315,9 +1315,9 @@ 3 wxBOTH 1 - + 0 - + fgFeatureConstraints wxFLEX_GROWMODE_SPECIFIED none @@ -1332,78 +1332,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum track width: - + 0 - - + + 0 - + 1 m_TrackMinWidthTitle 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1415,86 +1415,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 120,-1 1 m_TrackMinWidthCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - + wxString wxFILTER_NUMERIC wxTextValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1506,78 +1506,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_TrackMinWidthUnits 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1619,78 +1619,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum via diameter: - + 0 - - + + 0 - + 1 m_ViaMinTitle 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1702,86 +1702,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_SetViasMinSizeCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; 0 - + wxString wxFILTER_NUMERIC wxTextValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1793,78 +1793,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_ViaMinUnits 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1876,78 +1876,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum via drill: - + 0 - - + + 0 - + 1 m_ViaMinDrillTitle 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1959,86 +1959,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_SetViasMinDrillCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NUMERIC wxTextValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2050,78 +2050,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_ViaMinDrillUnits 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2163,78 +2163,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum uVia diameter: - + 0 - - + + 0 - + 1 m_uviaMinSizeLabel 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2246,86 +2246,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_uviaMinSizeCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NUMERIC wxTextValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2337,78 +2337,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_uviaMinSizeUnits 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2420,78 +2420,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum uVia drill: - + 0 - - + + 0 - + 1 m_uviaMinDrillLabel 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2503,86 +2503,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_uviaMinDrillCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NUMERIC wxTextValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2594,78 +2594,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_uviaMinDrillUnits 1 - - + + protected 1 - + Resizable 1 - + wxALIGN_LEFT - + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2707,78 +2707,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Minimum hole to hole: - + 0 - - + + 0 - + 1 m_HoleToHoleTitle 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2790,86 +2790,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_SetHoleToHoleCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2881,78 +2881,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_HoleToHoleUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2994,78 +2994,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Copper edge clearance: - + 0 - - + + 0 - + 1 m_EdgeClearanceLabel 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3077,86 +3077,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_EdgeClearanceCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3168,78 +3168,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm - + 0 - - + + 0 - + 1 m_EdgeClearanceUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +