eeschema: Warp to origin when moving - add missing text items

Schematic fields and text items were not being warped to origin when
moving.
This commit is contained in:
Roberto Fernandez Bautista 2021-11-06 15:18:40 +00:00
parent f847a76ac3
commit d1bab3116d
1 changed files with 16 additions and 10 deletions

View File

@ -264,23 +264,29 @@ std::set<SCH_ITEM*> EE_GRID_HELPER::queryVisible( const BOX2I& aArea,
void EE_GRID_HELPER::computeAnchors( SCH_ITEM *aItem, const VECTOR2I &aRefPos, bool aFrom )
{
switch ( aItem->Type() )
switch( aItem->Type() )
{
case SCH_TEXT_T:
case SCH_FIELD_T:
addAnchor( aItem->GetPosition(), ORIGIN, aItem );
break;
case SCH_SYMBOL_T:
case SCH_SHEET_T:
case SCH_SHEET_T:
addAnchor( aItem->GetPosition(), ORIGIN, aItem );
KI_FALLTHROUGH;
case SCH_JUNCTION_T:
case SCH_NO_CONNECT_T:
case SCH_LINE_T:
case SCH_GLOBAL_LABEL_T:
case SCH_HIER_LABEL_T:
case SCH_LABEL_T:
case SCH_BUS_WIRE_ENTRY_T:
{
case SCH_NO_CONNECT_T:
case SCH_LINE_T:
case SCH_GLOBAL_LABEL_T:
case SCH_HIER_LABEL_T:
case SCH_LABEL_T:
case SCH_BUS_WIRE_ENTRY_T:
{
std::vector<wxPoint> pts = aItem->GetConnectionPoints();
for( const wxPoint &pt : pts )
for( const wxPoint& pt : pts )
addAnchor( VECTOR2I( pt ), SNAPPABLE | CORNER, aItem );
break;