Fp editor: Fix bug when moving fp anchor: pad shapes where not updated on screen.

This commit is contained in:
jean-pierre charras 2020-09-21 14:43:26 +02:00
parent 719e8d276f
commit 492a634413
3 changed files with 5 additions and 1 deletions

View File

@ -477,6 +477,8 @@ void D_PAD::SetDrawCoord()
RotatePoint( &m_pos.x, &m_pos.y, angle );
m_pos += module->GetPosition();
m_shapesDirty = true;
}

View File

@ -326,6 +326,7 @@ public:
PAD_DRILL_SHAPE_T GetDrillShape() const { return m_drillShape; }
bool IsDirty() const { return m_shapesDirty; }
void SetDirty() { m_shapesDirty = true; }
void SetLayerSet( LSET aLayers ) override { m_layerMask = aLayers; }
LSET GetLayerSet() const override { return m_layerMask; }
@ -644,6 +645,7 @@ private:
*/
std::vector<std::shared_ptr<DRAWSEGMENT>> m_editPrimitives;
// Must be set to true to force rebuild shapes to draw (after geometry change for instance)
mutable bool m_shapesDirty;
mutable int m_effectiveBoundingRadius;
mutable EDA_RECT m_effectiveBoundingBox;

View File

@ -1065,7 +1065,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
int DRAWING_TOOL::SetAnchor( const TOOL_EVENT& aEvent )
{
assert( m_editModules );
wxASSERT( m_editModules );
if( !m_frame->GetModel() )
return 0;