router: SOLID::SetPos() should update the shape position too

This commit is contained in:
Tomasz Wlostowski 2020-02-28 23:05:49 +01:00
parent 5a16fda11a
commit 796aec6e6e
2 changed files with 13 additions and 5 deletions

View File

@ -79,4 +79,15 @@ ITEM* SOLID::Clone() const
return solid;
}
void SOLID::SetPos( const VECTOR2I& aCenter )
{
auto delta = aCenter - m_pos;
if( m_shape )
m_shape->Move( delta );
m_pos = aCenter;
}
}

View File

@ -78,10 +78,7 @@ public:
return m_pos;
}
void SetPos( const VECTOR2I& aCenter )
{
m_pos = aCenter;
}
void SetPos( const VECTOR2I& aCenter );
int GetPadToDie() const
{