Browse Source

POLYGON_BOOLEAN_ROUTINE: Copy filled attribute from the source

jobs
John Beard 1 year ago
parent
commit
5c6f334f8f
  1. 2
      pcbnew/tools/item_modification_routine.cpp
  2. 1
      pcbnew/tools/item_modification_routine.h

2
pcbnew/tools/item_modification_routine.cpp

@ -493,6 +493,7 @@ void POLYGON_BOOLEAN_ROUTINE::ProcessShape( PCB_SHAPE& aPcbShape )
{
m_width = aPcbShape.GetWidth();
m_layer = aPcbShape.GetLayer();
m_filled = aPcbShape.IsFilled();
m_workingPolygons = std::move( *poly );
m_firstPolygon = false;
@ -541,6 +542,7 @@ void POLYGON_BOOLEAN_ROUTINE::Finalize()
// Copy properties from the source polygon
new_poly_shape->SetWidth( m_width );
new_poly_shape->SetLayer( m_layer );
new_poly_shape->SetFilled( m_filled );
handler.AddNewItem( std::move( new_poly_shape ) );
}

1
pcbnew/tools/item_modification_routine.h

@ -360,6 +360,7 @@ private:
bool m_firstPolygon = true;
int m_width = 0;
PCB_LAYER_ID m_layer = PCB_LAYER_ID::UNDEFINED_LAYER;
bool m_filled = false;
};
class POLYGON_MERGE_ROUTINE : public POLYGON_BOOLEAN_ROUTINE

Loading…
Cancel
Save