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:
parent
ee3d75f273
commit
65821328d2
|
@ -622,12 +622,6 @@ SHOVE::SHOVE_STATUS SHOVE::pushVia( VIA* aVia, const VECTOR2I& aForce, int aCurr
|
||||||
pushedVia->SetPos( p0_pushed );
|
pushedVia->SetPos( p0_pushed );
|
||||||
pushedVia->Mark( aVia->Marker() );
|
pushedVia->Mark( aVia->Marker() );
|
||||||
|
|
||||||
if( aVia->Marker() & MK_HEAD )
|
|
||||||
{
|
|
||||||
m_draggedVia = pushedVia.get();
|
|
||||||
m_draggedViaHeadSet.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
for( ITEM* item : jt->LinkList() )
|
for( ITEM* item : jt->LinkList() )
|
||||||
{
|
{
|
||||||
if( SEGMENT* seg = dyn_cast<SEGMENT*>( item ) )
|
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" );
|
m_logger.Log( pushedVia.get(), 1, "pushed-via" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if( aVia->Marker() & MK_HEAD )
|
||||||
|
{
|
||||||
|
m_draggedVia = pushedVia.get();
|
||||||
|
m_draggedViaHeadSet.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
replaceItems( aVia, std::move( pushedVia ) );
|
replaceItems( aVia, std::move( pushedVia ) );
|
||||||
|
|
||||||
for( LINE_PAIR lp : draggedLines )
|
for( LINE_PAIR lp : draggedLines )
|
||||||
|
|
Loading…
Reference in New Issue