Skip to content

Commit

Permalink
Merge pull request #974 from leyan/topology_bug
Browse files Browse the repository at this point in the history
correct bug in topology rubberband when OTF is enabled
  • Loading branch information
3nids committed Oct 28, 2013
2 parents 5aac8bb + 990a25a commit 1f81a84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/nodetool/qgsmaptoolnodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void QgsMapToolNodeTool::createTopologyRubberBands( QgsVectorLayer* vlayer, cons
}
else
{
trb->addPoint( topolGeometry->vertexAt( tVertex ) );
trb->addPoint( toMapCoordinates( vlayer, topolGeometry->vertexAt( tVertex ) ) );
if ( tVertex == tVertexFirst ) // cycle first vertex need to be added also
{
movingPoints->insert( movingPointIndex );
Expand All @@ -206,14 +206,14 @@ void QgsMapToolNodeTool::createTopologyRubberBands( QgsVectorLayer* vlayer, cons
// find first no matching vertex
if ( dist > ZERO_TOLERANCE || !vertexMap[at]->isSelected() ) // problem with double precision
{
trb->addPoint( topolGeometry->vertexAt( tVertex ) );
trb->addPoint( toMapCoordinates( vlayer, topolGeometry->vertexAt( tVertex ) ) );
break; // found first vertex
}
else // add moving point to rubberband
{
if ( addedPoints->contains( tVertex ) )
break; // just preventing to circle
trb->addPoint( topolGeometry->vertexAt( tVertex ) );
trb->addPoint( toMapCoordinates( vlayer, topolGeometry->vertexAt( tVertex ) ) );
movingPoints->insert( movingPointIndex );
movingPointIndex++;
addedPoints->insert( tVertex );
Expand Down

0 comments on commit 1f81a84

Please sign in to comment.