router: DRAGGER::CurrentNode() should always return non-null value

This commit is contained in:
Tomasz Wlostowski 2021-02-11 23:06:34 +01:00
parent a9c54c10a2
commit 4574f52eac
1 changed files with 22 additions and 28 deletions

View File

@ -395,11 +395,6 @@ void DRAGGER::optimizeAndUpdateDraggedLine( LINE& aDragged, const LINE& aOrig, c
optimizer.SetEffortLevel( OPTIMIZER::MERGE_SEGMENTS | OPTIMIZER::KEEP_TOPOLOGY );
//printf("sa %d %d\n", aDraggedSeg.A.x, aDraggedSeg.A.y );
//Dbg()->AddPoint( aDraggedSeg.A, 4 );
//Dbg()->AddPoint( aDraggedSeg.B, 5 );
// Dbg()->AddLine( aDragged.CLine(), 3, 1000 );
OPT_BOX2I affectedArea = *aDragged.ChangedArea( &aOrig );
@ -410,7 +405,7 @@ void DRAGGER::optimizeAndUpdateDraggedLine( LINE& aDragged, const LINE& aOrig, c
//Dbg()->AddBox( *affectedArea, 2 );
optimizer.SetRestrictArea( *affectedArea );
optimizer.Optimize( &aDragged );
}
OPT_BOX2I optArea = *aDragged.ChangedArea( &aOrig );
@ -502,7 +497,6 @@ bool DRAGGER::dragWalkaround( const VECTOR2I& aP )
if( ok )
{
//Dbg()->AddLine( origLine.CLine(), 4, 100000 );
m_lastNode->Remove( origLine );
optimizeAndUpdateDraggedLine( draggedWalk, origLine, aP );
}