Add 45º constraints to lines when moving with CTRL

Fixes: lp:1774750
* https://bugs.launchpad.net/kicad/+bug/1774750
This commit is contained in:
Seth Hillbrand 2018-06-02 15:51:03 -07:00
parent 975e777149
commit 0a91f0bc9c
1 changed files with 2 additions and 3 deletions

View File

@ -732,10 +732,9 @@ void POINT_EDITOR::setAltConstraint( bool aEnabled )
{ {
EDIT_LINE* line = dynamic_cast<EDIT_LINE*>( m_editedPoint ); EDIT_LINE* line = dynamic_cast<EDIT_LINE*>( m_editedPoint );
if( line ) if( line && m_editPoints->GetParent()->Type() == PCB_ZONE_AREA_T )
{ {
if( m_editPoints->GetParent()->Type() == PCB_ZONE_AREA_T ) m_altConstraint.reset( (EDIT_CONSTRAINT<EDIT_POINT>*)( new EC_CONVERGING( *line, *m_editPoints ) ) );
m_altConstraint.reset( (EDIT_CONSTRAINT<EDIT_POINT>*)( new EC_CONVERGING( *line, *m_editPoints ) ) );
} }
else else
{ {