Improve encapsulation. SCH_LINE has no business knowing about drags.
This commit is contained in:
parent
eacc3e67a5
commit
57a491357f
|
@ -156,13 +156,28 @@ int SCH_LINE::GetLineStyleInternalId( const wxString& aStyleName )
|
|||
|
||||
void SCH_LINE::Move( const wxPoint& aOffset )
|
||||
{
|
||||
if( (m_Flags & STARTPOINT) == 0 && aOffset != wxPoint( 0, 0 ) )
|
||||
if( aOffset != wxPoint( 0, 0 ) )
|
||||
{
|
||||
m_start += aOffset;
|
||||
m_end += aOffset;
|
||||
SetModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_LINE::MoveStart( const wxPoint& aOffset )
|
||||
{
|
||||
if( aOffset != wxPoint( 0, 0 ) )
|
||||
{
|
||||
m_start += aOffset;
|
||||
SetModified();
|
||||
}
|
||||
}
|
||||
|
||||
if( (m_Flags & ENDPOINT) == 0 && aOffset != wxPoint( 0, 0 ) )
|
||||
|
||||
void SCH_LINE::MoveEnd( const wxPoint& aOffset )
|
||||
{
|
||||
if( aOffset != wxPoint( 0, 0 ) )
|
||||
{
|
||||
m_end += aOffset;
|
||||
SetModified();
|
||||
|
|
|
@ -122,6 +122,8 @@ public:
|
|||
int GetPenSize() const override;
|
||||
|
||||
void Move( const wxPoint& aMoveVector ) override;
|
||||
void MoveStart( const wxPoint& aMoveVector );
|
||||
void MoveEnd( const wxPoint& aMoveVector );
|
||||
|
||||
void MirrorX( int aXaxis_position ) override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue