Differentiate between Line and Area corner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18263
This commit is contained in:
parent
2c40aa6278
commit
312fc8bdbe
|
@ -1174,7 +1174,9 @@ bool EE_POINT_EDITOR::removeCornerCondition( const SELECTION& )
|
||||||
|
|
||||||
SHAPE_LINE_CHAIN& poly = shape->GetPolyShape().Outline( 0 );
|
SHAPE_LINE_CHAIN& poly = shape->GetPolyShape().Outline( 0 );
|
||||||
|
|
||||||
if( poly.GetPointCount() < 3 )
|
if( m_editPoints->GetParent()->Type() == SCH_SHAPE_T && poly.GetPointCount() <= 2 )
|
||||||
|
return false;
|
||||||
|
if( m_editPoints->GetParent()->Type() == SCH_RULE_AREA_T && poly.GetPointCount() <= 3 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for( const VECTOR2I& pt : poly.CPoints() )
|
for( const VECTOR2I& pt : poly.CPoints() )
|
||||||
|
@ -1263,7 +1265,9 @@ int EE_POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
|
||||||
SHAPE_LINE_CHAIN& poly = shape->GetPolyShape().Outline( 0 );
|
SHAPE_LINE_CHAIN& poly = shape->GetPolyShape().Outline( 0 );
|
||||||
SCH_COMMIT commit( m_toolMgr );
|
SCH_COMMIT commit( m_toolMgr );
|
||||||
|
|
||||||
if( poly.GetPointCount() <= 3 )
|
if( m_editPoints->GetParent()->Type() == SCH_SHAPE_T && poly.GetPointCount() <= 2 )
|
||||||
|
return 0;
|
||||||
|
if( m_editPoints->GetParent()->Type() == SCH_RULE_AREA_T && poly.GetPointCount() <= 3 )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
commit.Modify( shape, m_frame->GetScreen() );
|
commit.Modify( shape, m_frame->GetScreen() );
|
||||||
|
|
Loading…
Reference in New Issue