diff --git a/include/eda_shape.h b/include/eda_shape.h index 202c9f57b5..5a13f6a0e6 100644 --- a/include/eda_shape.h +++ b/include/eda_shape.h @@ -85,8 +85,8 @@ public: wxString SHAPE_T_asString() const; - bool IsAnnotationProxy() const { return m_annotationProxy; } - void SetIsAnnotationProxy( bool aIsProxy = true ) { m_annotationProxy = aIsProxy; } + virtual bool IsAnnotationProxy() const { return m_annotationProxy; } + virtual void SetIsAnnotationProxy( bool aIsProxy = true ) { m_annotationProxy = aIsProxy; } bool IsFilled() const { diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index 0b5d12ec11..92e71dd353 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -96,8 +96,11 @@ private: PCB_PLOT_PARAMS m_plotOpts; wxRearrangeList* m_plotAllLayersList; + +#if 0 STD_BITMAP_BUTTON* m_bpMoveUp; STD_BITMAP_BUTTON* m_bpMoveDown; +#endif /// The plot layer set that last time the dialog was opened. static LSET m_lastLayerSet; diff --git a/pcbnew/fix_board_shape.cpp b/pcbnew/fix_board_shape.cpp index ab53ac4380..467205369e 100644 --- a/pcbnew/fix_board_shape.cpp +++ b/pcbnew/fix_board_shape.cpp @@ -119,7 +119,7 @@ void ConnectBoardShapes( std::vector& aShapeList, } } else if( ( shape0 == SHAPE_T::ARC && shape1 == SHAPE_T::SEGMENT ) - || shape0 == SHAPE_T::SEGMENT && shape1 == SHAPE_T::ARC ) + || ( shape0 == SHAPE_T::SEGMENT && shape1 == SHAPE_T::ARC ) ) { PCB_SHAPE* arcShape = shape0 == SHAPE_T::ARC ? aPrevShape : aShape; PCB_SHAPE* segShape = shape0 == SHAPE_T::SEGMENT ? aPrevShape : aShape; diff --git a/pcbnew/pcb_shape.cpp b/pcbnew/pcb_shape.cpp index a6c5c2245a..43f60c9794 100644 --- a/pcbnew/pcb_shape.cpp +++ b/pcbnew/pcb_shape.cpp @@ -354,6 +354,17 @@ void PCB_SHAPE::Mirror( const VECTOR2I& aCentre, bool aMirrorAroundXAxis ) } +void PCB_SHAPE::SetIsAnnotationProxy( bool aIsProxy ) +{ + if( aIsProxy && !m_annotationProxy ) + SetStroke( STROKE_PARAMS( 1 ) ); + else if( m_annotationProxy && !aIsProxy ) + SetStroke( STROKE_PARAMS( pcbIUScale.mmToIU( DEFAULT_LINE_WIDTH ) ) ); + + m_annotationProxy = aIsProxy; +} + + double PCB_SHAPE::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const { constexpr double HIDE = std::numeric_limits::max(); @@ -602,8 +613,8 @@ static struct PCB_SHAPE_DESC const wxString groupPadPrimitives = _HKI( "Pad Primitives" ); - propMgr.AddProperty( new PROPERTY( _HKI( "Number Box" ), - &EDA_SHAPE::SetIsAnnotationProxy, &EDA_SHAPE::IsAnnotationProxy ), + propMgr.AddProperty( new PROPERTY( _HKI( "Number Box" ), + &PCB_SHAPE::SetIsAnnotationProxy, &PCB_SHAPE::IsAnnotationProxy ), groupPadPrimitives ) .SetAvailableFunc( isPadEditMode ); } diff --git a/pcbnew/pcb_shape.h b/pcbnew/pcb_shape.h index 4bc79524b9..db6918dda7 100644 --- a/pcbnew/pcb_shape.h +++ b/pcbnew/pcb_shape.h @@ -102,6 +102,9 @@ public: std::shared_ptr GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER, FLASHING aFlash = FLASHING::DEFAULT ) const override; + bool IsAnnotationProxy() const override { return m_annotationProxy; } + void SetIsAnnotationProxy( bool aIsProxy = true ) override; + void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) override; const BOX2I GetBoundingBox() const override { return getBoundingBox(); }