Browse Source

Make sure text caches get updated on move.

Fixes https://gitlab.com/kicad/code/kicad/issues/11319
7.0
Jeff Young 4 years ago
parent
commit
aee5ff8935
  1. 7
      pcbnew/fp_textbox.cpp
  2. 2
      pcbnew/fp_textbox.h
  3. 7
      pcbnew/pcb_textbox.cpp
  4. 2
      pcbnew/pcb_textbox.h

7
pcbnew/fp_textbox.cpp

@ -178,6 +178,13 @@ bool FP_TEXTBOX::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy
}
void FP_TEXTBOX::Move( const VECTOR2I& aMoveVector )
{
FP_SHAPE::Move( aMoveVector );
EDA_TEXT::Offset( aMoveVector );
}
void FP_TEXTBOX::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
{
FP_SHAPE::Rotate( aRotCentre, aAngle );

2
pcbnew/fp_textbox.h

@ -79,6 +79,8 @@ public:
std::vector<VECTOR2I> GetAnchorAndOppositeCorner() const;
void Move( const VECTOR2I& aMoveVector ) override;
/// Rotate text, in footprint editor
/// (for instance in footprint rotation transform)
void Rotate( const VECTOR2I& aOffset, const EDA_ANGLE& aAngle ) override;

7
pcbnew/pcb_textbox.cpp

@ -247,6 +247,13 @@ void PCB_TEXTBOX::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL
}
void PCB_TEXTBOX::Move( const VECTOR2I& aMoveVector )
{
PCB_SHAPE::Move( aMoveVector );
EDA_TEXT::Offset( aMoveVector );
}
void PCB_TEXTBOX::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
{
PCB_SHAPE::Rotate( aRotCentre, aAngle );

2
pcbnew/pcb_textbox.h

@ -79,6 +79,8 @@ public:
std::vector<VECTOR2I> GetAnchorAndOppositeCorner() const;
void Move( const VECTOR2I& aMoveVector ) override;
void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;

Loading…
Cancel
Save