From 10e60acf34f344168ecf7e600cca39d182e410f5 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 6 Jun 2021 15:03:10 -0400 Subject: [PATCH] Clean up including of board_design_settings.h --- 3d-viewer/3d_canvas/board_adapter.cpp | 1 + 3d-viewer/3d_canvas/create_layer_items.cpp | 1 + 3d-viewer/3d_viewer/eda_3d_viewer.cpp | 1 + common/widgets/net_selector.cpp | 1 + include/board_design_settings.h | 8 +- pcbnew/CMakeLists.txt | 1 + pcbnew/board.cpp | 26 ++++ pcbnew/board.h | 24 ++-- pcbnew/board_connected_item.cpp | 3 +- pcbnew/board_design_settings.cpp | 17 +-- ...board_items_to_polygon_shape_transform.cpp | 1 + .../panel_board_finish.cpp | 1 + .../panel_board_stackup.cpp | 1 + .../convert_drawsegment_list_to_polygon.cpp | 1 + pcbnew/cross-probing.cpp | 2 + pcbnew/dialogs/dialog_board_setup.cpp | 1 + pcbnew/dialogs/dialog_board_statistics.cpp | 1 + pcbnew/dialogs/dialog_drc.cpp | 2 + pcbnew/dialogs/dialog_exchange_footprints.cpp | 1 + pcbnew/dialogs/dialog_export_svg.cpp | 1 + pcbnew/dialogs/dialog_gendrill.cpp | 4 +- .../dialog_global_edit_text_and_graphics.cpp | 1 + .../dialog_global_edit_tracks_and_vias.cpp | 1 + pcbnew/dialogs/dialog_net_inspector.cpp | 1 + pcbnew/dialogs/dialog_pad_properties.cpp | 11 +- pcbnew/dialogs/dialog_pad_properties.h | 7 +- pcbnew/dialogs/dialog_plot.cpp | 1 + pcbnew/dialogs/dialog_position_relative.cpp | 1 + .../dialogs/dialog_track_via_properties.cpp | 2 + pcbnew/dimension.cpp | 1 + pcbnew/drc/drc_engine.cpp | 2 + pcbnew/drc/drc_results_provider.cpp | 113 ++++++++++++++++++ pcbnew/drc/drc_results_provider.h | 87 +------------- pcbnew/drc/drc_test_provider_annulus.cpp | 1 + pcbnew/drc/drc_test_provider_connectivity.cpp | 1 + .../drc_test_provider_copper_clearance.cpp | 2 + .../drc_test_provider_courtyard_clearance.cpp | 5 +- pcbnew/drc/drc_test_provider_disallow.cpp | 1 + pcbnew/drc/drc_test_provider_hole_size.cpp | 1 + pcbnew/drc/drc_test_provider_hole_to_hole.cpp | 2 + pcbnew/drc/drc_test_provider_lvs.cpp | 1 + .../drc/drc_test_provider_matched_length.cpp | 1 + pcbnew/drc/drc_test_provider_misc.cpp | 1 + .../drc/drc_test_provider_silk_clearance.cpp | 1 + pcbnew/drc/drc_test_provider_silk_to_mask.cpp | 1 + pcbnew/drc/drc_test_provider_track_width.cpp | 1 + pcbnew/drc/drc_test_provider_via_diameter.cpp | 1 + pcbnew/edit.cpp | 1 + pcbnew/edit_track_width.cpp | 1 + pcbnew/exporters/export_d356.cpp | 2 + .../exporters/export_footprints_placefile.cpp | 3 +- pcbnew/exporters/export_gencad.cpp | 2 + pcbnew/exporters/export_hyperlynx.cpp | 2 + pcbnew/exporters/export_idf.cpp | 2 + pcbnew/exporters/export_vrml.cpp | 2 + .../exporters/gendrill_file_writer_base.cpp | 1 + pcbnew/exporters/gendrill_gerber_writer.cpp | 1 + pcbnew/exporters/gerber_jobfile_writer.cpp | 2 + pcbnew/exporters/gerber_placefile_writer.cpp | 2 + pcbnew/files.cpp | 1 + pcbnew/footprint.cpp | 2 + pcbnew/fp_text.cpp | 2 + pcbnew/initpcb.cpp | 1 + pcbnew/kicad_clipboard.cpp | 1 + pcbnew/microwave/microwave_footprint.cpp | 2 + pcbnew/microwave/microwave_inductor.cpp | 1 + pcbnew/microwave/microwave_polygon.cpp | 1 + pcbnew/netinfo_item.cpp | 1 + pcbnew/pad.cpp | 3 + pcbnew/pad_custom_shape_functions.cpp | 1 + pcbnew/pcb_base_edit_frame.cpp | 1 + pcbnew/pcb_display_options.cpp | 1 + pcbnew/pcb_edit_frame.cpp | 1 + pcbnew/pcb_expr_evaluator.cpp | 1 + pcbnew/pcb_marker.cpp | 1 + pcbnew/pcb_painter.cpp | 1 + pcbnew/pcb_shape.cpp | 1 + pcbnew/pcb_target.cpp | 1 + pcbnew/pcb_text.cpp | 2 + pcbnew/pcbnew_config.cpp | 1 + pcbnew/pcbplot.cpp | 1 + pcbnew/plot_board_layers.cpp | 2 + pcbnew/plugins/altium/altium_pcb.cpp | 2 + .../cadstar/cadstar_pcb_archive_loader.cpp | 3 + .../cadstar/cadstar_pcb_archive_loader.h | 1 + pcbnew/plugins/eagle/eagle_plugin.cpp | 3 + pcbnew/plugins/fabmaster/import_fabmaster.cpp | 2 + pcbnew/plugins/geda/gpcb_plugin.cpp | 1 + pcbnew/plugins/kicad/kicad_plugin.cpp | 2 + pcbnew/plugins/kicad/pcb_parser.cpp | 5 +- pcbnew/plugins/legacy/legacy_plugin.cpp | 6 +- .../scripting/pcbnew_scripting_helpers.cpp | 1 + pcbnew/python/swig/board_design_settings.i | 2 + pcbnew/router/pns_kicad_iface.cpp | 2 + pcbnew/router/pns_topology.cpp | 1 + pcbnew/router/router_tool.cpp | 1 + .../specctra_export.cpp | 2 + .../specctra_import.cpp | 1 + pcbnew/toolbars_pcb_editor.cpp | 5 +- pcbnew/tools/board_editor_control.cpp | 4 +- pcbnew/tools/board_inspection_tool.cpp | 1 + pcbnew/tools/board_inspection_tool.h | 1 + pcbnew/tools/convert_tool.cpp | 1 + pcbnew/tools/drawing_stackup_table_tool.cpp | 1 + pcbnew/tools/drawing_tool.cpp | 1 + pcbnew/tools/drc_tool.cpp | 2 + pcbnew/tools/edit_tool.cpp | 1 + pcbnew/tools/footprint_editor_control.cpp | 1 + pcbnew/tools/pad_tool.cpp | 13 +- pcbnew/tools/pcb_control.cpp | 1 + pcbnew/tools/pcb_grid_helper.cpp | 1 + pcbnew/tools/pcb_point_editor.cpp | 1 + pcbnew/tools/pcb_selection_tool.cpp | 2 + pcbnew/tools/position_relative_tool.cpp | 1 + pcbnew/tools/zone_create_helper.cpp | 1 + pcbnew/tools/zone_filler_tool.cpp | 1 + pcbnew/tools/zone_filler_tool.h | 1 + pcbnew/track.cpp | 1 + pcbnew/undo_redo.cpp | 1 + pcbnew/widgets/appearance_controls.cpp | 1 + pcbnew/zone.cpp | 2 + pcbnew/zone_filler.cpp | 2 + 122 files changed, 347 insertions(+), 133 deletions(-) create mode 100644 pcbnew/drc/drc_results_provider.cpp diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index 4c94289208..0193e4d432 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -29,6 +29,7 @@ #include "../3d_rendering/camera.h" #include "board_adapter.h" +#include #include <3d_rendering/3d_render_raytracing/shapes2D/polygon_2d.h> #include #include <3d_math.h> diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp index 5853de25a8..3749935a96 100644 --- a/3d-viewer/3d_canvas/create_layer_items.cpp +++ b/3d-viewer/3d_canvas/create_layer_items.cpp @@ -37,6 +37,7 @@ #include "../3d_rendering/3d_render_raytracing/shapes3D/cylinder_3d.h" #include +#include #include #include #include diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index b0265169ff..7b636f6d73 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -36,6 +36,7 @@ #include <3d_viewer/tools/3d_controller.h> #include <3d_viewer/tools/3d_conditions.h> #include +#include #include #include #include diff --git a/common/widgets/net_selector.cpp b/common/widgets/net_selector.cpp index d05789507a..b4f34211e3 100644 --- a/common/widgets/net_selector.cpp +++ b/common/widgets/net_selector.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/include/board_design_settings.h b/include/board_design_settings.h index 3a1434e127..15de8fd3f2 100644 --- a/include/board_design_settings.h +++ b/include/board_design_settings.h @@ -25,7 +25,8 @@ #ifndef BOARD_DESIGN_SETTINGS_H_ #define BOARD_DESIGN_SETTINGS_H_ -#include +#include + #include #include #include @@ -211,6 +212,7 @@ enum class DIM_UNITS_FORMAT : int; enum class DIM_TEXT_POSITION : int; enum class DIM_UNITS_MODE : int; +class PAD; /** * Container for design settings for a #BOARD object. @@ -750,8 +752,8 @@ public: wxPoint m_AuxOrigin; ///< origin for plot exports wxPoint m_GridOrigin; ///< origin for grid offsets - PAD m_Pad_Master; // A dummy pad to store all default parameters - // when importing values or creating a new pad + std::unique_ptr m_Pad_Master; // A dummy pad to store all default parameters + // when importing values or creating a new pad // Set to true if the board has a stackup management. // If not set a default basic stackup will be used to generate the gbrjob file. diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 6f34094bef..545f1e592b 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -226,6 +226,7 @@ set( PCBNEW_MICROWAVE_SRCS ) set( PCBNEW_DRC_SRCS + drc/drc_results_provider.cpp drc/drc_test_provider.cpp drc/drc_test_provider_annulus.cpp drc/drc_test_provider_disallow.cpp diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 5bb8b0bc78..bd22e40790 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -487,6 +488,12 @@ void BOARD::SetEnabledLayers( LSET aLayerSet ) } +bool BOARD::IsLayerEnabled( PCB_LAYER_ID aLayer ) const +{ + return GetDesignSettings().IsLayerEnabled( aLayer ); +} + + void BOARD::SetVisibleLayers( LSET aLayerSet ) { if( m_project ) @@ -577,6 +584,25 @@ bool BOARD::IsFootprintLayerVisible( PCB_LAYER_ID aLayer ) const } + +BOARD_DESIGN_SETTINGS& BOARD::GetDesignSettings() const +{ + return *m_designSettings; +} + + +const ZONE_SETTINGS& BOARD::GetZoneSettings() const +{ + return GetDesignSettings().GetDefaultZoneSettings(); +} + + +void BOARD::SetZoneSettings( const ZONE_SETTINGS& aSettings ) +{ + GetDesignSettings().SetDefaultZoneSettings( aSettings ); +} + + void BOARD::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode ) { if( aBoardItem == nullptr ) diff --git a/pcbnew/board.h b/pcbnew/board.h index 5424182292..11671b44cf 100644 --- a/pcbnew/board.h +++ b/pcbnew/board.h @@ -25,7 +25,6 @@ #ifndef CLASS_BOARD_H_ #define CLASS_BOARD_H_ -#include #include #include // Needed for stl hash extensions #include // for OUTLINE_ERROR_HANDLER @@ -35,7 +34,10 @@ #include #include #include +#include +class BOARD_DESIGN_SETTINGS; +class BOARD_CONNECTED_ITEM; class BOARD_COMMIT; class DRC_RTREE; class PCB_BASE_FRAME; @@ -438,10 +440,7 @@ public: * @param aLayer = The layer to be tested * @return true if the layer is visible. */ - bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const - { - return GetDesignSettings().IsLayerEnabled( aLayer ); - } + bool IsLayerEnabled( PCB_LAYER_ID aLayer ) const; /** * A proxy function that calls the correspondent function in m_BoardSettings @@ -523,20 +522,11 @@ public: /** * @return the BOARD_DESIGN_SETTINGS for this BOARD */ - BOARD_DESIGN_SETTINGS& GetDesignSettings() const - { - return *m_designSettings; - } + BOARD_DESIGN_SETTINGS& GetDesignSettings() const; - const ZONE_SETTINGS& GetZoneSettings() const override - { - return GetDesignSettings().GetDefaultZoneSettings(); - } + const ZONE_SETTINGS& GetZoneSettings() const override; - void SetZoneSettings( const ZONE_SETTINGS& aSettings ) override - { - GetDesignSettings().SetDefaultZoneSettings( aSettings ); - } + void SetZoneSettings( const ZONE_SETTINGS& aSettings ) override; const PAGE_INFO& GetPageSettings() const { return m_paper; } void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; } diff --git a/pcbnew/board_connected_item.cpp b/pcbnew/board_connected_item.cpp index 5e227d52bf..c6f6ec71da 100644 --- a/pcbnew/board_connected_item.cpp +++ b/pcbnew/board_connected_item.cpp @@ -24,7 +24,8 @@ */ #include -#include +#include +#include #include #include #include diff --git a/pcbnew/board_design_settings.cpp b/pcbnew/board_design_settings.cpp index 44de473ca8..fb57805d56 100644 --- a/pcbnew/board_design_settings.cpp +++ b/pcbnew/board_design_settings.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -32,14 +33,14 @@ #include #include #include +#include #include const int bdsSchemaVersion = 2; BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) : - NESTED_SETTINGS( "board_design_settings", bdsSchemaVersion, aParent, aPath ), - m_Pad_Master( NULL ) + NESTED_SETTINGS( "board_design_settings", bdsSchemaVersion, aParent, aPath ) { // We want to leave alone parameters that aren't found in the project JSON as they may be // initialized by the board file parser before NESTED_SETTINGS::LoadFromFile is called. @@ -53,6 +54,8 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std: m_HasStackup = false; // no stackup defined by default + m_Pad_Master = std::make_unique( nullptr ); + LSET all_set = LSET().set(); m_enabledLayers = all_set; // All layers enabled at first. // SetCopperLayerCount() will adjust this. @@ -560,9 +563,9 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std: { nlohmann::json ret = { - { "width", Iu2Millimeter( m_Pad_Master.GetSize().x ) }, - { "height", Iu2Millimeter( m_Pad_Master.GetSize().y ) }, - { "drill", Iu2Millimeter( m_Pad_Master.GetDrillSize().x ) } + { "width", Iu2Millimeter( m_Pad_Master->GetSize().x ) }, + { "height", Iu2Millimeter( m_Pad_Master->GetSize().y ) }, + { "drill", Iu2Millimeter( m_Pad_Master->GetDrillSize().x ) } }; return ret; @@ -576,11 +579,11 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std: sz.SetWidth( Millimeter2iu( aJson["width"].get() ) ); sz.SetHeight( Millimeter2iu( aJson["height"].get() ) ); - m_Pad_Master.SetSize( sz ); + m_Pad_Master->SetSize( sz ); int drill = Millimeter2iu( aJson["drill"].get() ); - m_Pad_Master.SetDrillSize( wxSize( drill, drill ) ); + m_Pad_Master->SetDrillSize( wxSize( drill, drill ) ); } }, {} ) ); diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index b58a36ff0a..0a665e466a 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/board_stackup_manager/panel_board_finish.cpp b/pcbnew/board_stackup_manager/panel_board_finish.cpp index 07e803effd..2a2015766d 100644 --- a/pcbnew/board_stackup_manager/panel_board_finish.cpp +++ b/pcbnew/board_stackup_manager/panel_board_finish.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include "panel_board_finish.h" diff --git a/pcbnew/board_stackup_manager/panel_board_stackup.cpp b/pcbnew/board_stackup_manager/panel_board_stackup.cpp index 66dbea296a..db5b0321dc 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup.cpp +++ b/pcbnew/board_stackup_manager/panel_board_stackup.cpp @@ -26,6 +26,7 @@ #include // arrayDim definition #include #include +#include #include #include #include diff --git a/pcbnew/convert_drawsegment_list_to_polygon.cpp b/pcbnew/convert_drawsegment_list_to_polygon.cpp index cda2221914..5710540b35 100644 --- a/pcbnew/convert_drawsegment_list_to_polygon.cpp +++ b/pcbnew/convert_drawsegment_list_to_polygon.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index f179b41cb3..477ecfda89 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -32,7 +32,9 @@ */ #include +#include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_board_setup.cpp b/pcbnew/dialogs/dialog_board_setup.cpp index a56af945e2..690cbebd67 100644 --- a/pcbnew/dialogs/dialog_board_setup.cpp +++ b/pcbnew/dialogs/dialog_board_setup.cpp @@ -26,6 +26,7 @@ #include <../board_stackup_manager/panel_board_stackup.h> #include <../board_stackup_manager/panel_board_finish.h> #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_board_statistics.cpp b/pcbnew/dialogs/dialog_board_statistics.cpp index b07e43c502..68d4a35d22 100644 --- a/pcbnew/dialogs/dialog_board_statistics.cpp +++ b/pcbnew/dialogs/dialog_board_statistics.cpp @@ -25,6 +25,7 @@ #include "dialog_board_statistics.h" #include "base_units.h" +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index bf32f7c0b4..dd7d43c0f0 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -25,8 +25,10 @@ #include #include +#include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index eb19b0b2e6..6af3c21deb 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_export_svg.cpp b/pcbnew/dialogs/dialog_export_svg.cpp index a4b8d15610..a77a2004ec 100644 --- a/pcbnew/dialogs/dialog_export_svg.cpp +++ b/pcbnew/dialogs/dialog_export_svg.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 9bbc9bc232..06135e07d7 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -32,8 +32,10 @@ #include #include #include -#include +#include #include +#include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp index 0364a1ed48..c9908c6d98 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 2f18a99a7f..9d184cd718 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_net_inspector.cpp b/pcbnew/dialogs/dialog_net_inspector.cpp index 46c0de7220..1d45f481bd 100644 --- a/pcbnew/dialogs/dialog_net_inspector.cpp +++ b/pcbnew/dialogs/dialog_net_inspector.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index ea581797d7..2b8ae9538c 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -161,7 +163,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad m_FlippedWarningIcon->SetBitmap( KiBitmap( BITMAPS::dialog_warning ) ); m_nonCopperWarningIcon->SetBitmap( KiBitmap( BITMAPS::dialog_warning ) ); - m_padMaster = &m_parent->GetDesignSettings().m_Pad_Master; + m_padMaster = m_parent->GetDesignSettings().m_Pad_Master.get(); m_dummyPad = new PAD( (FOOTPRINT*) NULL ); if( aPad ) @@ -1072,6 +1074,13 @@ void DIALOG_PAD_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) } +void DIALOG_PAD_PROPERTIES::OnUpdateUINonCopperWarning( wxUpdateUIEvent& event ) +{ + bool isOnCopperLayer = ( m_dummyPad->GetLayerSet() & LSET::AllCuMask() ).any(); + m_nonCopperWarningBook->SetSelection( isOnCopperLayer ? 0 : 1 ); +} + + void DIALOG_PAD_PROPERTIES::updatePadLayersList( LSET layer_mask, bool remove_unconnected, bool keep_top_bottom ) { diff --git a/pcbnew/dialogs/dialog_pad_properties.h b/pcbnew/dialogs/dialog_pad_properties.h index 5c7c94824c..ea159d1ddb 100644 --- a/pcbnew/dialogs/dialog_pad_properties.h +++ b/pcbnew/dialogs/dialog_pad_properties.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -79,11 +80,7 @@ private: void OnCancel( wxCommandEvent& event ) override; void OnUpdateUI( wxUpdateUIEvent& event ) override; - void OnUpdateUINonCopperWarning( wxUpdateUIEvent& event ) override - { - bool isOnCopperLayer = ( m_dummyPad->GetLayerSet() & LSET::AllCuMask() ).any(); - m_nonCopperWarningBook->SetSelection( isOnCopperLayer ? 0 : 1 ); - } + void OnUpdateUINonCopperWarning( wxUpdateUIEvent& event ) override; void OnPadShapeSelection( wxCommandEvent& event ) override; void OnDrillShapeSelected( wxCommandEvent& event ) override; diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 4564940343..e1dcbfe4d7 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_position_relative.cpp b/pcbnew/dialogs/dialog_position_relative.cpp index d766f578d4..7b1efdbb17 100644 --- a/pcbnew/dialogs/dialog_position_relative.cpp +++ b/pcbnew/dialogs/dialog_position_relative.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include // initialise statics diff --git a/pcbnew/dialogs/dialog_track_via_properties.cpp b/pcbnew/dialogs/dialog_track_via_properties.cpp index 7b6ca02e8d..15688e2cf8 100644 --- a/pcbnew/dialogs/dialog_track_via_properties.cpp +++ b/pcbnew/dialogs/dialog_track_via_properties.cpp @@ -27,7 +27,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 4c5073912d..8e8a7dc719 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 5fb2721c64..3367c126a3 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_results_provider.cpp b/pcbnew/drc/drc_results_provider.cpp new file mode 100644 index 0000000000..9a9d27f0bc --- /dev/null +++ b/pcbnew/drc/drc_results_provider.cpp @@ -0,0 +1,113 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2018-2021 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include "drc_results_provider.h" + +void BOARD_DRC_ITEMS_PROVIDER::SetSeverities( int aSeverities ) +{ + m_severities = aSeverities; + + BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings(); + + m_filteredMarkers.clear(); + + for( PCB_MARKER* marker : m_board->Markers() ) + { + SEVERITY markerSeverity; + + if( marker->IsExcluded() ) + markerSeverity = RPT_SEVERITY_EXCLUSION; + else + markerSeverity = bds.GetSeverity( marker->GetRCItem()->GetErrorCode() ); + + if( markerSeverity & m_severities ) + m_filteredMarkers.push_back( marker ); + } +} + + +int BOARD_DRC_ITEMS_PROVIDER::GetCount( int aSeverity ) const +{ + if( aSeverity < 0 ) + return m_filteredMarkers.size(); + + BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings(); + + int count = 0; + + for( PCB_MARKER* marker : m_board->Markers() ) + { + SEVERITY markerSeverity; + + if( marker->IsExcluded() ) + markerSeverity = RPT_SEVERITY_EXCLUSION; + else + markerSeverity = bds.GetSeverity( marker->GetRCItem()->GetErrorCode() ); + + if( markerSeverity == aSeverity ) + count++; + } + + return count; +} + + +void VECTOR_DRC_ITEMS_PROVIDER::SetSeverities( int aSeverities ) +{ + m_severities = aSeverities; + + BOARD_DESIGN_SETTINGS& bds = m_frame->GetBoard()->GetDesignSettings(); + + m_filteredVector.clear(); + + if( m_sourceVector ) + { + for( const std::shared_ptr& item : *m_sourceVector ) + { + if( bds.GetSeverity( item->GetErrorCode() ) & aSeverities ) + m_filteredVector.push_back( item ); + } + } +} + + +int VECTOR_DRC_ITEMS_PROVIDER::GetCount( int aSeverity ) const +{ + if( aSeverity < 0 ) + return m_filteredVector.size(); + + int count = 0; + BOARD_DESIGN_SETTINGS& bds = m_frame->GetBoard()->GetDesignSettings(); + + if( m_sourceVector ) + { + for( const std::shared_ptr& item : *m_sourceVector ) + { + if( bds.GetSeverity( item->GetErrorCode() ) == aSeverity ) + count++; + } + } + + return count; +} \ No newline at end of file diff --git a/pcbnew/drc/drc_results_provider.h b/pcbnew/drc/drc_results_provider.h index cf40386f17..622fde3f4a 100644 --- a/pcbnew/drc/drc_results_provider.h +++ b/pcbnew/drc/drc_results_provider.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2018-2020 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2018-2021 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -53,52 +53,9 @@ public: { } - void SetSeverities( int aSeverities ) override - { - m_severities = aSeverities; + void SetSeverities( int aSeverities ) override; - BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings(); - - m_filteredMarkers.clear(); - - for( PCB_MARKER* marker : m_board->Markers() ) - { - SEVERITY markerSeverity; - - if( marker->IsExcluded() ) - markerSeverity = RPT_SEVERITY_EXCLUSION; - else - markerSeverity = bds.GetSeverity( marker->GetRCItem()->GetErrorCode() ); - - if( markerSeverity & m_severities ) - m_filteredMarkers.push_back( marker ); - } - } - - int GetCount( int aSeverity = -1 ) const override - { - if( aSeverity < 0 ) - return m_filteredMarkers.size(); - - BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings(); - - int count = 0; - - for( PCB_MARKER* marker : m_board->Markers() ) - { - SEVERITY markerSeverity; - - if( marker->IsExcluded() ) - markerSeverity = RPT_SEVERITY_EXCLUSION; - else - markerSeverity = bds.GetSeverity( marker->GetRCItem()->GetErrorCode() ); - - if( markerSeverity == aSeverity ) - count++; - } - - return count; - } + int GetCount( int aSeverity = -1 ) const override; std::shared_ptr GetItem( int aIndex ) const override { @@ -149,43 +106,9 @@ public: { } - void SetSeverities( int aSeverities ) override - { - m_severities = aSeverities; + void SetSeverities( int aSeverities ) override; - BOARD_DESIGN_SETTINGS& bds = m_frame->GetBoard()->GetDesignSettings(); - - m_filteredVector.clear(); - - if( m_sourceVector ) - { - for( const std::shared_ptr& item : *m_sourceVector ) - { - if( bds.GetSeverity( item->GetErrorCode() ) & aSeverities ) - m_filteredVector.push_back( item ); - } - } - } - - int GetCount( int aSeverity = -1 ) const override - { - if( aSeverity < 0 ) - return m_filteredVector.size(); - - int count = 0; - BOARD_DESIGN_SETTINGS& bds = m_frame->GetBoard()->GetDesignSettings(); - - if( m_sourceVector ) - { - for( const std::shared_ptr& item : *m_sourceVector ) - { - if( bds.GetSeverity( item->GetErrorCode() ) == aSeverity ) - count++; - } - } - - return count; - } + int GetCount( int aSeverity = -1 ) const override; std::shared_ptr GetItem( int aIndex ) const override { diff --git a/pcbnew/drc/drc_test_provider_annulus.cpp b/pcbnew/drc/drc_test_provider_annulus.cpp index 73b428066a..e58ae4835d 100644 --- a/pcbnew/drc/drc_test_provider_annulus.cpp +++ b/pcbnew/drc/drc_test_provider_annulus.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_connectivity.cpp b/pcbnew/drc/drc_test_provider_connectivity.cpp index e90c43aa66..62b51a63d9 100644 --- a/pcbnew/drc/drc_test_provider_connectivity.cpp +++ b/pcbnew/drc/drc_test_provider_connectivity.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index dba1f184cb..dee6e4d1fb 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -34,6 +35,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp b/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp index c3381da3f8..506e49c193 100644 --- a/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include #include @@ -46,13 +47,13 @@ public: m_isRuleDriven = false; } - virtual ~DRC_TEST_PROVIDER_COURTYARD_CLEARANCE () + virtual ~DRC_TEST_PROVIDER_COURTYARD_CLEARANCE () { } virtual bool Run() override; - virtual const wxString GetName() const override + virtual const wxString GetName() const override { return "courtyard_clearance"; } diff --git a/pcbnew/drc/drc_test_provider_disallow.cpp b/pcbnew/drc/drc_test_provider_disallow.cpp index 43e6424c57..52a56f7692 100644 --- a/pcbnew/drc/drc_test_provider_disallow.cpp +++ b/pcbnew/drc/drc_test_provider_disallow.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include /* diff --git a/pcbnew/drc/drc_test_provider_hole_size.cpp b/pcbnew/drc/drc_test_provider_hole_size.cpp index 0e38b067fb..8e5ee5566c 100644 --- a/pcbnew/drc/drc_test_provider_hole_size.cpp +++ b/pcbnew/drc/drc_test_provider_hole_size.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_hole_to_hole.cpp b/pcbnew/drc/drc_test_provider_hole_to_hole.cpp index f419e3dbf8..4abecc0bc7 100644 --- a/pcbnew/drc/drc_test_provider_hole_to_hole.cpp +++ b/pcbnew/drc/drc_test_provider_hole_to_hole.cpp @@ -22,11 +22,13 @@ */ #include +#include #include #include #include #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_lvs.cpp b/pcbnew/drc/drc_test_provider_lvs.cpp index a17ad3441e..8579f1ecc7 100644 --- a/pcbnew/drc/drc_test_provider_lvs.cpp +++ b/pcbnew/drc/drc_test_provider_lvs.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_matched_length.cpp b/pcbnew/drc/drc_test_provider_matched_length.cpp index 24b606de0e..f5ae0df588 100644 --- a/pcbnew/drc/drc_test_provider_matched_length.cpp +++ b/pcbnew/drc/drc_test_provider_matched_length.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_misc.cpp b/pcbnew/drc/drc_test_provider_misc.cpp index e3cfcf0899..800df1d34d 100644 --- a/pcbnew/drc/drc_test_provider_misc.cpp +++ b/pcbnew/drc/drc_test_provider_misc.cpp @@ -21,6 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_silk_clearance.cpp b/pcbnew/drc/drc_test_provider_silk_clearance.cpp index f87b389298..7d9338cd9a 100644 --- a/pcbnew/drc/drc_test_provider_silk_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_silk_clearance.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_silk_to_mask.cpp b/pcbnew/drc/drc_test_provider_silk_to_mask.cpp index a4f5545cc1..5298e3da97 100644 --- a/pcbnew/drc/drc_test_provider_silk_to_mask.cpp +++ b/pcbnew/drc/drc_test_provider_silk_to_mask.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_track_width.cpp b/pcbnew/drc/drc_test_provider_track_width.cpp index 92e1b5f1ad..2df7ed0c28 100644 --- a/pcbnew/drc/drc_test_provider_track_width.cpp +++ b/pcbnew/drc/drc_test_provider_track_width.cpp @@ -23,6 +23,7 @@ //#include #include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider_via_diameter.cpp b/pcbnew/drc/drc_test_provider_via_diameter.cpp index 1753c11481..9c7f002654 100644 --- a/pcbnew/drc/drc_test_provider_via_diameter.cpp +++ b/pcbnew/drc/drc_test_provider_via_diameter.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 450d54c702..298686be51 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index 2d5049a829..6f39ba6f7b 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -22,6 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index 273a1c075c..fbb953498b 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -38,7 +38,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/pcbnew/exporters/export_footprints_placefile.cpp b/pcbnew/exporters/export_footprints_placefile.cpp index 1b3b28b7e5..c76b9593ea 100644 --- a/pcbnew/exporters/export_footprints_placefile.cpp +++ b/pcbnew/exporters/export_footprints_placefile.cpp @@ -29,9 +29,10 @@ #include #include #include +#include #include #include - +#include class LIST_MOD // An helper class used to build a list of useful footprints. { diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp index 361a094cbd..e7e0900576 100644 --- a/pcbnew/exporters/export_gencad.cpp +++ b/pcbnew/exporters/export_gencad.cpp @@ -31,8 +31,10 @@ #include #include +#include #include #include +#include #include #include #include diff --git a/pcbnew/exporters/export_hyperlynx.cpp b/pcbnew/exporters/export_hyperlynx.cpp index 2a782a0cf7..9be363ccb3 100644 --- a/pcbnew/exporters/export_hyperlynx.cpp +++ b/pcbnew/exporters/export_hyperlynx.cpp @@ -25,8 +25,10 @@ #include #include #include +#include #include #include +#include #include #include #include diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 630c059bb4..d865c14f37 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -31,9 +31,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include "project.h" diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index a1cbb013f0..aadaa7bf23 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -34,8 +34,10 @@ #include "3d_cache/3d_cache.h" #include "3d_cache/3d_info.h" #include "board.h" +#include "board_design_settings.h" #include "fp_shape.h" #include "footprint.h" +#include "pad.h" #include "pcb_text.h" #include "track.h" #include "convert_to_biu.h" diff --git a/pcbnew/exporters/gendrill_file_writer_base.cpp b/pcbnew/exporters/gendrill_file_writer_base.cpp index 217029270d..9164e77d2f 100644 --- a/pcbnew/exporters/gendrill_file_writer_base.cpp +++ b/pcbnew/exporters/gendrill_file_writer_base.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/exporters/gendrill_gerber_writer.cpp b/pcbnew/exporters/gendrill_gerber_writer.cpp index d57fb49c50..cdfd6cd4ec 100644 --- a/pcbnew/exporters/gendrill_gerber_writer.cpp +++ b/pcbnew/exporters/gendrill_gerber_writer.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/exporters/gerber_jobfile_writer.cpp b/pcbnew/exporters/gerber_jobfile_writer.cpp index bb97f42716..89189419e7 100644 --- a/pcbnew/exporters/gerber_jobfile_writer.cpp +++ b/pcbnew/exporters/gerber_jobfile_writer.cpp @@ -37,7 +37,9 @@ #include #include +#include #include +#include #include #include diff --git a/pcbnew/exporters/gerber_placefile_writer.cpp b/pcbnew/exporters/gerber_placefile_writer.cpp index 6d8c1fb7dc..37caadeaec 100644 --- a/pcbnew/exporters/gerber_placefile_writer.cpp +++ b/pcbnew/exporters/gerber_placefile_writer.cpp @@ -36,11 +36,13 @@ #include #include +#include #include #include #include #include +#include PLACEFILE_GERBER_WRITER::PLACEFILE_GERBER_WRITER( BOARD* aPcb ) diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index b121c048b2..67fa794fe7 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include <3d_viewer/eda_3d_viewer.h> #include #include diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 43376e3628..974ec26fc0 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -32,8 +32,10 @@ #include #include #include +#include #include #include +#include #include #include #include diff --git a/pcbnew/fp_text.cpp b/pcbnew/fp_text.cpp index 8522245225..b281cae853 100644 --- a/pcbnew/fp_text.cpp +++ b/pcbnew/fp_text.cpp @@ -27,12 +27,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) : BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ), diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index 6116fee7eb..e712a148b1 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp index d2564cb8ae..6b3ec50bdf 100644 --- a/pcbnew/kicad_clipboard.cpp +++ b/pcbnew/kicad_clipboard.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/microwave/microwave_footprint.cpp b/pcbnew/microwave/microwave_footprint.cpp index 7cf2781aef..87780da7d3 100644 --- a/pcbnew/microwave/microwave_footprint.cpp +++ b/pcbnew/microwave/microwave_footprint.cpp @@ -22,7 +22,9 @@ */ +#include #include +#include #include #include #include diff --git a/pcbnew/microwave/microwave_inductor.cpp b/pcbnew/microwave/microwave_inductor.cpp index 21fdff59c3..cf9bb0833f 100644 --- a/pcbnew/microwave/microwave_inductor.cpp +++ b/pcbnew/microwave/microwave_inductor.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/microwave/microwave_polygon.cpp b/pcbnew/microwave/microwave_polygon.cpp index 34f74adb04..c8923d3da4 100644 --- a/pcbnew/microwave/microwave_polygon.cpp +++ b/pcbnew/microwave/microwave_polygon.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include // for KiROUND diff --git a/pcbnew/netinfo_item.cpp b/pcbnew/netinfo_item.cpp index 57e86fd14b..2b14d5c02b 100644 --- a/pcbnew/netinfo_item.cpp +++ b/pcbnew/netinfo_item.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index e784edc678..60e7b0f961 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -37,7 +37,10 @@ #include #include #include +#include +#include #include +#include #include #include #include diff --git a/pcbnew/pad_custom_shape_functions.cpp b/pcbnew/pad_custom_shape_functions.cpp index f59d6aac73..81373c6ffe 100644 --- a/pcbnew/pad_custom_shape_functions.cpp +++ b/pcbnew/pad_custom_shape_functions.cpp @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/pcbnew/pcb_base_edit_frame.cpp b/pcbnew/pcb_base_edit_frame.cpp index 3757bce5d3..825fb63c87 100644 --- a/pcbnew/pcb_base_edit_frame.cpp +++ b/pcbnew/pcb_base_edit_frame.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcb_display_options.cpp b/pcbnew/pcb_display_options.cpp index 7bc66d9634..8053bb71d1 100644 --- a/pcbnew/pcb_display_options.cpp +++ b/pcbnew/pcb_display_options.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index bc2e51852e..dee610316b 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcb_expr_evaluator.cpp b/pcbnew/pcb_expr_evaluator.cpp index 1566c9b9e0..ddb3b93c9b 100644 --- a/pcbnew/pcb_expr_evaluator.cpp +++ b/pcbnew/pcb_expr_evaluator.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcb_marker.cpp b/pcbnew/pcb_marker.cpp index e8ab4ea8de..1d36be4412 100644 --- a/pcbnew/pcb_marker.cpp +++ b/pcbnew/pcb_marker.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index ef22928d76..86e19ec525 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -24,6 +24,7 @@ */ #include +#include #include #include #include diff --git a/pcbnew/pcb_shape.cpp b/pcbnew/pcb_shape.cpp index a03505d70b..0947ecd817 100644 --- a/pcbnew/pcb_shape.cpp +++ b/pcbnew/pcb_shape.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcb_target.cpp b/pcbnew/pcb_target.cpp index bc2dca6284..7db6c234bb 100644 --- a/pcbnew/pcb_target.cpp +++ b/pcbnew/pcb_target.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/pcb_text.cpp b/pcbnew/pcb_text.cpp index 15a37d2318..9df862b085 100644 --- a/pcbnew/pcb_text.cpp +++ b/pcbnew/pcb_text.cpp @@ -28,12 +28,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include using KIGFX::PCB_RENDER_SETTINGS; diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 80e7702dc7..0f9ab35ac2 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index af74e0b409..780592be68 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index c4b0965551..360cd3aa05 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -36,10 +36,12 @@ #include // for KiROUND #include +#include #include #include #include #include +#include #include #include #include diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index 3940a9045b..ba06489e8f 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -27,7 +27,9 @@ #include #include +#include #include +#include #include #include #include diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 83e6bb6860..a760ef1cee 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -25,12 +25,15 @@ #include +#include #include // KEY_COPPER, KEY_CORE, KEY_PREPREG #include +#include #include #include #include #include +#include #include #include #include diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h index f7bb6ddd7e..d48fe9ef87 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h @@ -33,6 +33,7 @@ #include class BOARD; +class BOARD_STACKUP_ITEM; class DIMENSION_BASE; class CADSTAR_PCB_ARCHIVE_LOADER : public CADSTAR_PCB_ARCHIVE_PARSER diff --git a/pcbnew/plugins/eagle/eagle_plugin.cpp b/pcbnew/plugins/eagle/eagle_plugin.cpp index ed7dc3a1d6..db1c7bb14e 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.cpp +++ b/pcbnew/plugins/eagle/eagle_plugin.cpp @@ -69,10 +69,13 @@ Load() TODO's #include // for KiROUND #include +#include #include +#include #include #include #include +#include #include #include diff --git a/pcbnew/plugins/fabmaster/import_fabmaster.cpp b/pcbnew/plugins/fabmaster/import_fabmaster.cpp index a20ce4b3a1..1b365e92d7 100644 --- a/pcbnew/plugins/fabmaster/import_fabmaster.cpp +++ b/pcbnew/plugins/fabmaster/import_fabmaster.cpp @@ -39,10 +39,12 @@ #include #include +#include #include #include #include #include +#include #include #include #include diff --git a/pcbnew/plugins/geda/gpcb_plugin.cpp b/pcbnew/plugins/geda/gpcb_plugin.cpp index e64a997216..0e5c56b5c3 100644 --- a/pcbnew/plugins/geda/gpcb_plugin.cpp +++ b/pcbnew/plugins/geda/gpcb_plugin.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/plugins/kicad/kicad_plugin.cpp b/pcbnew/plugins/kicad/kicad_plugin.cpp index 6d639227d1..39209a21c5 100644 --- a/pcbnew/plugins/kicad/kicad_plugin.cpp +++ b/pcbnew/plugins/kicad/kicad_plugin.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include // for enum RECT_CHAMFER_POSITIONS definition @@ -36,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/plugins/kicad/pcb_parser.cpp b/pcbnew/plugins/kicad/pcb_parser.cpp index cce5924c3e..d0888e0f34 100644 --- a/pcbnew/plugins/kicad/pcb_parser.cpp +++ b/pcbnew/plugins/kicad/pcb_parser.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -1845,7 +1846,7 @@ void PCB_PARSER::parseSetup() wxSize sz; sz.SetWidth( parseBoardUnits( "master pad width" ) ); sz.SetHeight( parseBoardUnits( "master pad height" ) ); - designSettings.m_Pad_Master.SetSize( sz ); + designSettings.m_Pad_Master->SetSize( sz ); m_board->m_LegacyDesignSettingsLoaded = true; NeedRIGHT(); } @@ -1854,7 +1855,7 @@ void PCB_PARSER::parseSetup() case T_pad_drill: { int drillSize = parseBoardUnits( T_pad_drill ); - designSettings.m_Pad_Master.SetDrillSize( wxSize( drillSize, drillSize ) ); + designSettings.m_Pad_Master->SetDrillSize( wxSize( drillSize, drillSize ) ); m_board->m_LegacyDesignSettingsLoaded = true; NeedRIGHT(); } diff --git a/pcbnew/plugins/legacy/legacy_plugin.cpp b/pcbnew/plugins/legacy/legacy_plugin.cpp index 40dc3b1f9c..20ce20460f 100644 --- a/pcbnew/plugins/legacy/legacy_plugin.cpp +++ b/pcbnew/plugins/legacy/legacy_plugin.cpp @@ -72,7 +72,9 @@ #include #include +#include #include +#include #include #include #include @@ -1067,13 +1069,13 @@ void LEGACY_PLUGIN::loadSETUP() BIU x = biuParse( line + SZ( "PadSize" ), &data ); BIU y = biuParse( data ); - bds.m_Pad_Master.SetSize( wxSize( x, y ) ); + bds.m_Pad_Master->SetSize( wxSize( x, y ) ); } else if( TESTLINE( "PadDrill" ) ) { BIU tmp = biuParse( line + SZ( "PadDrill" ) ); - bds.m_Pad_Master.SetDrillSize( wxSize( tmp, tmp ) ); + bds.m_Pad_Master->SetDrillSize( wxSize( tmp, tmp ) ); } else if( TESTLINE( "Pad2MaskClearance" ) ) diff --git a/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp b/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp index 85bdcf8388..c0a9719c9a 100644 --- a/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp +++ b/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/python/swig/board_design_settings.i b/pcbnew/python/swig/board_design_settings.i index 910dc42dc6..6fb899f403 100644 --- a/pcbnew/python/swig/board_design_settings.i +++ b/pcbnew/python/swig/board_design_settings.i @@ -1,3 +1,5 @@ +%ignore BOARD_DESIGN_SETTINGS::m_Pad_Master; + %include %{ #include diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 4c41035f22..bf8fba98b8 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -21,8 +21,10 @@ #include #include +#include #include #include +#include #include #include #include diff --git a/pcbnew/router/pns_topology.cpp b/pcbnew/router/pns_topology.cpp index 2548eaf405..1133178cbe 100644 --- a/pcbnew/router/pns_topology.cpp +++ b/pcbnew/router/pns_topology.cpp @@ -31,6 +31,7 @@ #include "pns_topology.h" #include +#include namespace PNS { diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index e58e852fe9..be6675a6e8 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -26,6 +26,7 @@ #include using namespace std::placeholders; #include +#include #include #include #include diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index fb29c0e0e9..37d5ec5435 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -43,9 +43,11 @@ #include // std::map #include +#include #include #include #include +#include #include #include #include diff --git a/pcbnew/specctra_import_export/specctra_import.cpp b/pcbnew/specctra_import_export/specctra_import.cpp index 11ecfdfb85..17b21e8fce 100644 --- a/pcbnew/specctra_import_export/specctra_import.cpp +++ b/pcbnew/specctra_import_export/specctra_import.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index aadd86907a..d1c97c4652 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -419,7 +420,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() if( !tuneGroup ) { - tuneGroup = new ACTION_GROUP( "group.pcbTune", + tuneGroup = new ACTION_GROUP( "group.pcbTune", { &PCB_ACTIONS::routerTuneSingleTrace, &PCB_ACTIONS::routerTuneDiffPair, &PCB_ACTIONS::routerTuneDiffPairSkew } ); @@ -472,7 +473,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routeSingleTrack, makeRouteMenu() ); m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routeDiffPair, makeRouteMenu() ); - auto makeTuneMenu = + auto makeTuneMenu = [&]() { std::unique_ptr tuneMenu = std::make_unique( false, selTool ); diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index e9772a9015..7045fc24b1 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -31,10 +31,12 @@ #include "edit_tool.h" #include "tool/tool_event.h" #include -#include #include +#include +#include #include #include +#include #include #include #include diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 65099baa82..22fed63b8a 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -39,6 +39,7 @@ #include #include #include +#include void DIALOG_INSPECTION_REPORTER::OnErrorLinkClicked( wxHtmlLinkEvent& event ) { diff --git a/pcbnew/tools/board_inspection_tool.h b/pcbnew/tools/board_inspection_tool.h index bd48f5ebab..5a7bc3137d 100644 --- a/pcbnew/tools/board_inspection_tool.h +++ b/pcbnew/tools/board_inspection_tool.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/convert_tool.cpp b/pcbnew/tools/convert_tool.cpp index ef4b33efd7..8684d153b8 100644 --- a/pcbnew/tools/convert_tool.cpp +++ b/pcbnew/tools/convert_tool.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/drawing_stackup_table_tool.cpp b/pcbnew/tools/drawing_stackup_table_tool.cpp index a97d6ea890..4dd54171c5 100644 --- a/pcbnew/tools/drawing_stackup_table_tool.cpp +++ b/pcbnew/tools/drawing_stackup_table_tool.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 10046c2d20..f093b15b03 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -60,6 +60,7 @@ #include #include #include +#include using SCOPED_DRAW_MODE = SCOPED_SET_RESET; diff --git a/pcbnew/tools/drc_tool.cpp b/pcbnew/tools/drc_tool.cpp index f1581d68c1..ce083b09f5 100644 --- a/pcbnew/tools/drc_tool.cpp +++ b/pcbnew/tools/drc_tool.cpp @@ -31,7 +31,9 @@ #include #include #include +#include #include +#include #include #include diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index c6ff78e451..747cc93dc6 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index caf820a613..7c47932b74 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/pad_tool.cpp b/pcbnew/tools/pad_tool.cpp index 5591e4b6ac..e6208114ab 100644 --- a/pcbnew/tools/pad_tool.cpp +++ b/pcbnew/tools/pad_tool.cpp @@ -28,9 +28,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -125,7 +127,7 @@ int PAD_TOOL::pastePadProperties( const TOOL_EVENT& aEvent ) { PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool(); const PCB_SELECTION& selection = selTool->GetSelection(); - const PAD& masterPad = frame()->GetDesignSettings().m_Pad_Master; + const PAD* masterPad = frame()->GetDesignSettings().m_Pad_Master.get(); BOARD_COMMIT commit( frame() ); @@ -135,7 +137,7 @@ int PAD_TOOL::pastePadProperties( const TOOL_EVENT& aEvent ) if( item->Type() == PCB_PAD_T ) { commit.Modify( item ); - static_cast( *item ).ImportSettingsFrom( masterPad ); + static_cast( *item ).ImportSettingsFrom( *masterPad ); } } @@ -152,7 +154,6 @@ int PAD_TOOL::copyPadSettings( const TOOL_EVENT& aEvent ) { PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool(); const PCB_SELECTION& selection = selTool->GetSelection(); - PAD& masterPad = frame()->GetDesignSettings().m_Pad_Master; // can only copy from a single pad if( selection.Size() == 1 ) @@ -162,7 +163,7 @@ int PAD_TOOL::copyPadSettings( const TOOL_EVENT& aEvent ) if( item->Type() == PCB_PAD_T ) { const PAD& selPad = static_cast( *item ); - masterPad.ImportSettingsFrom( selPad ); + frame()->GetDesignSettings().m_Pad_Master->ImportSettingsFrom( selPad ); m_padCopied = true; } } @@ -481,7 +482,7 @@ int PAD_TOOL::PlacePad( const TOOL_EVENT& aEvent ) { PAD* pad = new PAD( m_board->GetFirstFootprint() ); - pad->ImportSettingsFrom( m_frame->GetDesignSettings().m_Pad_Master ); + pad->ImportSettingsFrom( *(m_frame->GetDesignSettings().m_Pad_Master.get()) ); if( PAD_NAMING::PadCanHaveName( *pad ) ) { @@ -500,7 +501,7 @@ int PAD_TOOL::PlacePad( const TOOL_EVENT& aEvent ) if( pad ) { - m_frame->GetDesignSettings().m_Pad_Master.ImportSettingsFrom( *pad ); + m_frame->GetDesignSettings().m_Pad_Master->ImportSettingsFrom( *pad ); pad->SetLocalCoord(); aCommit.Add( aItem ); return true; diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 943fdfbcc7..8c1bdb9e73 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/pcb_grid_helper.cpp b/pcbnew/tools/pcb_grid_helper.cpp index dc80f2507d..7d856f31ad 100644 --- a/pcbnew/tools/pcb_grid_helper.cpp +++ b/pcbnew/tools/pcb_grid_helper.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/pcb_point_editor.cpp b/pcbnew/tools/pcb_point_editor.cpp index a032378756..9463aa4c3a 100644 --- a/pcbnew/tools/pcb_point_editor.cpp +++ b/pcbnew/tools/pcb_point_editor.cpp @@ -41,6 +41,7 @@ using namespace std::placeholders; #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index c5702a1031..30836cf335 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -29,10 +29,12 @@ using namespace std::placeholders; #include #include +#include #include #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/position_relative_tool.cpp b/pcbnew/tools/position_relative_tool.cpp index 6d065a0ce5..8a696c6792 100644 --- a/pcbnew/tools/position_relative_tool.cpp +++ b/pcbnew/tools/position_relative_tool.cpp @@ -36,6 +36,7 @@ using namespace std::placeholders; #include #include #include +#include POSITION_RELATIVE_TOOL::POSITION_RELATIVE_TOOL() : diff --git a/pcbnew/tools/zone_create_helper.cpp b/pcbnew/tools/zone_create_helper.cpp index 3a9505979c..5bbe02c5cf 100644 --- a/pcbnew/tools/zone_create_helper.cpp +++ b/pcbnew/tools/zone_create_helper.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/zone_filler_tool.cpp b/pcbnew/tools/zone_filler_tool.cpp index bba501c212..d5ef6f7241 100644 --- a/pcbnew/tools/zone_filler_tool.cpp +++ b/pcbnew/tools/zone_filler_tool.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/tools/zone_filler_tool.h b/pcbnew/tools/zone_filler_tool.h index fc9db0d6ef..ffb7894b4d 100644 --- a/pcbnew/tools/zone_filler_tool.h +++ b/pcbnew/tools/zone_filler_tool.h @@ -31,6 +31,7 @@ class PCB_EDIT_FRAME; +class PROGRESS_REPORTER; class WX_PROGRESS_REPORTER; diff --git a/pcbnew/track.cpp b/pcbnew/track.cpp index 616d4ab6fd..ed2b1b2778 100644 --- a/pcbnew/track.cpp +++ b/pcbnew/track.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/undo_redo.cpp b/pcbnew/undo_redo.cpp index 9668b8ed65..c61985015a 100644 --- a/pcbnew/undo_redo.cpp +++ b/pcbnew/undo_redo.cpp @@ -34,6 +34,7 @@ using namespace std::placeholders; #include #include #include +#include #include #include #include diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index dbfe656374..d6bcc75801 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index 5cbacbd849..2241bf386c 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 73d28b8acc..2078eba08b 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -29,8 +29,10 @@ #include #include +#include #include #include +#include #include #include #include