diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index bb0135ef20..076e344358 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1194,7 +1194,7 @@ int SCH_EDIT_FRAME::RecomputeIntersheetsRefs() iref = new SCH_IREF(); gLabel->SetIref( iref ); - iref->SetParent( gLabel ); + iref->SetParentLabel( gLabel ); iref->SetFlags( IS_NEW ); iref->SetScreen( screen ); diff --git a/eeschema/sch_iref.cpp b/eeschema/sch_iref.cpp index b1be8acc54..e3c70eda9d 100644 --- a/eeschema/sch_iref.cpp +++ b/eeschema/sch_iref.cpp @@ -35,9 +35,8 @@ SCH_IREF::SCH_IREF( const wxPoint& pos, const wxString& text, SCH_GLOBALLABEL* a SCH_TEXT( pos, text, SCH_IREF_T ) { m_Layer = LAYER_GLOBLABEL; - m_parent = aParent; + m_parentLabel = aParent; SetMultilineAllowed( false ); - m_ownPageNumber = 0; m_screen = nullptr; } @@ -46,9 +45,9 @@ void SCH_IREF::PlaceAtDefaultPosition() { wxPoint offset; - int labelLen = m_parent->GetBoundingBox().GetSizeMax(); + int labelLen = m_parentLabel->GetBoundingBox().GetSizeMax(); - switch( m_parent->GetLabelSpinStyle() ) + switch( m_parentLabel->GetLabelSpinStyle() ) { default: case LABEL_SPIN_STYLE::LEFT: offset.x -= labelLen; break; @@ -57,12 +56,12 @@ void SCH_IREF::PlaceAtDefaultPosition() case LABEL_SPIN_STYLE::BOTTOM: offset.y += labelLen; break; } - SetTextPos( m_parent->GetPosition() + offset ); + SetTextPos( m_parentLabel->GetPosition() + offset ); } wxPoint SCH_IREF::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const { - return m_parent->GetSchematicTextOffset( aSettings ); + return m_parentLabel->GetSchematicTextOffset( aSettings ); } @@ -115,11 +114,11 @@ void SCH_IREF::SetIrefOrientation( LABEL_SPIN_STYLE aSpinStyle ) void SCH_IREF::CopyParentStyle() { - SetTextSize( m_parent->GetTextSize() ); - SetItalic( m_parent->IsItalic() ); - SetBold( m_parent->IsBold() ); - SetTextThickness( m_parent->GetTextThickness() ); - SetIrefOrientation( m_parent->GetLabelSpinStyle() ); + SetTextSize( m_parentLabel->GetTextSize() ); + SetItalic( m_parentLabel->IsItalic() ); + SetBold( m_parentLabel->IsBold() ); + SetTextThickness( m_parentLabel->GetTextThickness() ); + SetIrefOrientation( m_parentLabel->GetLabelSpinStyle() ); } diff --git a/eeschema/sch_iref.h b/eeschema/sch_iref.h index fe1fb16c15..8d302a122d 100644 --- a/eeschema/sch_iref.h +++ b/eeschema/sch_iref.h @@ -64,9 +64,9 @@ public: wxPoint GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const override; - SCH_GLOBALLABEL* GetParent() { return m_parent; } + SCH_GLOBALLABEL* GetParentLabel() { return m_parentLabel; } - void SetParent( SCH_GLOBALLABEL* parent ) { m_parent = parent; } + void SetParentLabel( SCH_GLOBALLABEL* parent ) { m_parentLabel = parent; } SCH_SCREEN* GetScreen() { return m_screen; } @@ -82,8 +82,7 @@ private: using EDA_ITEM::SetParent; std::vector m_refTable; - SCH_GLOBALLABEL* m_parent; - int m_ownPageNumber; + SCH_GLOBALLABEL* m_parentLabel; SCH_SCREEN* m_screen; }; diff --git a/eeschema/schematic_settings.cpp b/eeschema/schematic_settings.cpp index b467209443..5ab46eb0bc 100644 --- a/eeschema/schematic_settings.cpp +++ b/eeschema/schematic_settings.cpp @@ -77,10 +77,10 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin &m_IntersheetsRefFormatShort, defaultIntersheetsRefFormatShort ) ); m_params.emplace_back( new PARAM( "drawing.intersheets_ref_prefix", - &m_IntersheetsRefPrefix, "[" ) ); + &m_IntersheetsRefPrefix, defaultIntersheetsRefPrefix ) ); m_params.emplace_back( new PARAM( "drawing.intersheets_ref_suffix", - &m_IntersheetsRefSuffix, "]" ) ); + &m_IntersheetsRefSuffix, defaultIntersheetsRefSuffix ) ); m_params.emplace_back( new PARAM_SCALED( "drawing.default_line_thickness", &m_DefaultLineWidth, Mils2iu( defaultLineThickness ), diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 3ceac7a06e..c7e88cf543 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -721,7 +721,7 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta ) SCH_IREF* iref = static_cast( aItem ); wxPoint pt = (wxPoint) aDelta; - int style = iref->GetParent()->GetLabelSpinStyle(); + int style = iref->GetParentLabel()->GetLabelSpinStyle(); if( iref->GetParent()->IsSelected() ) break; diff --git a/pcbnew/drc/drc_test_provider_diff_pair_coupling.cpp b/pcbnew/drc/drc_test_provider_diff_pair_coupling.cpp index fb2a3058e3..905effea73 100644 --- a/pcbnew/drc/drc_test_provider_diff_pair_coupling.cpp +++ b/pcbnew/drc/drc_test_provider_diff_pair_coupling.cpp @@ -377,9 +377,8 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run() return true; }; - int numItems = - forEachGeometryItem( { PCB_TRACE_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_AREA_T, PCB_ARC_T }, - LSET::AllCuMask(), addToTree ); + forEachGeometryItem( { PCB_TRACE_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_AREA_T, PCB_ARC_T }, + LSET::AllCuMask(), addToTree ); reportAux( wxString::Format( _("DPs evaluated:") ) ); diff --git a/pcbnew/drc/drc_test_provider_hole_clearance.cpp b/pcbnew/drc/drc_test_provider_hole_clearance.cpp index 9e1f1112c2..7c728454d8 100644 --- a/pcbnew/drc/drc_test_provider_hole_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_hole_clearance.cpp @@ -221,7 +221,6 @@ bool DRC_TEST_PROVIDER_HOLE_CLEARANCE::doPadToPadHoleDrc( int aRefPadIdx, const static LSET all_cu = LSET::AllCuMask(); D_PAD* refPad = aSortedPadsList[aRefPadIdx]; - LSET layerMask = refPad->GetLayerSet() & all_cu; for( int idx = aRefPadIdx; idx < (int)aSortedPadsList.size(); ++idx ) {