Skip to content
Permalink
Browse files

Merge pull request #974 from leyan/topology_bug

correct bug in topology rubberband when OTF is enabled
  • Loading branch information
3nids committed Oct 28, 2013
2 parents 5aac8bb + 990a25a commit 1f81a84c9ee702d0dc6af05d55b54975e2ad9812
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/nodetool/qgsmaptoolnodetool.cpp
@@ -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 );
@@ -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 );

0 comments on commit 1f81a84

Please sign in to comment.
You can’t perform that action at this time.