pcbnew: Don't limit editing of the polygons
45 deg contraints are not saved per polygon, so don't limit per polygon.
The constraint is only enforced during creation.
Fixes: lp:1847722
* https://bugs.launchpad.net/kicad/+bug/1847722
Fixes: lp:1846029
* https://bugs.launchpad.net/kicad/+bug/1846029
(cherry picked from commit 8f1c1cf298
)
This commit is contained in:
parent
2d1ea1618b
commit
5d852cf6ae
|
@ -492,17 +492,6 @@ public:
|
||||||
return m_lines.size();
|
return m_lines.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAllowPoints( bool aAllow = true )
|
|
||||||
{
|
|
||||||
m_allowPoints = aAllow;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetAllowPoints() const
|
|
||||||
{
|
|
||||||
return m_allowPoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///> @copydoc VIEW_ITEM::ViewBBox()
|
///> @copydoc VIEW_ITEM::ViewBBox()
|
||||||
virtual const BOX2I ViewBBox() const override;
|
virtual const BOX2I ViewBBox() const override;
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,6 @@ public:
|
||||||
{
|
{
|
||||||
auto zone = static_cast<const ZONE_CONTAINER*>( aItem );
|
auto zone = static_cast<const ZONE_CONTAINER*>( aItem );
|
||||||
buildForPolyOutline( points, zone->Outline(), aGal );
|
buildForPolyOutline( points, zone->Outline(), aGal );
|
||||||
points->SetAllowPoints( !zone->GetHV45() );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,8 +369,7 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
|
||||||
snapLayers, { item } ) );
|
snapLayers, { item } ) );
|
||||||
|
|
||||||
// The alternative constraint limits to 45°
|
// The alternative constraint limits to 45°
|
||||||
bool enableAltConstraint =
|
bool enableAltConstraint = !!evt->Modifier( MD_CTRL );
|
||||||
( !!evt->Modifier( MD_CTRL ) || !m_editPoints->GetAllowPoints() );
|
|
||||||
|
|
||||||
if( enableAltConstraint != (bool) m_altConstraint ) // alternative constraint
|
if( enableAltConstraint != (bool) m_altConstraint ) // alternative constraint
|
||||||
setAltConstraint( enableAltConstraint );
|
setAltConstraint( enableAltConstraint );
|
||||||
|
|
Loading…
Reference in New Issue