Fix a crash when dragging a via attached to a locked track (PNS)

Fixes: lp:1625835
* https://bugs.launchpad.net/kicad/+bug/1625835
This commit is contained in:
Maciej Suminski 2016-09-21 14:47:07 +02:00
parent ee3d75f273
commit 65821328d2
1 changed files with 6 additions and 6 deletions

View File

@ -622,12 +622,6 @@ SHOVE::SHOVE_STATUS SHOVE::pushVia( VIA* aVia, const VECTOR2I& aForce, int aCurr
pushedVia->SetPos( p0_pushed );
pushedVia->Mark( aVia->Marker() );
if( aVia->Marker() & MK_HEAD )
{
m_draggedVia = pushedVia.get();
m_draggedViaHeadSet.Clear();
}
for( ITEM* item : jt->LinkList() )
{
if( SEGMENT* seg = dyn_cast<SEGMENT*>( item ) )
@ -671,6 +665,12 @@ SHOVE::SHOVE_STATUS SHOVE::pushVia( VIA* aVia, const VECTOR2I& aForce, int aCurr
m_logger.Log( pushedVia.get(), 1, "pushed-via" );
#endif
if( aVia->Marker() & MK_HEAD )
{
m_draggedVia = pushedVia.get();
m_draggedViaHeadSet.Clear();
}
replaceItems( aVia, std::move( pushedVia ) );
for( LINE_PAIR lp : draggedLines )