Skip to content
Permalink
Browse files
More travis debugging
  • Loading branch information
wonder-sk committed Mar 29, 2017
1 parent 4f339cb commit 3482a70fd7fb44b410b0649eef2453437a080862
Showing with 9 additions and 0 deletions.
  1. +7 −0 src/core/qgspointlocator.cpp
  2. +2 −0 tests/src/app/testqgsnodetool.cpp
@@ -673,6 +673,7 @@ bool QgsPointLocator::hasIndex() const

bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
{
qDebug( "rebuild index" );
destroyIndex();

QLinkedList<RTree::Data *> dataList;
@@ -699,12 +700,15 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
QgsDebugMsg( QString( "could not transform bounding box to map, skipping the snap filter (%1)" ).arg( e.what() ) );
}
}
qDebug( "index extent %s", rect.toString().toAscii().data() );
request.setFilterRect( rect );
}
QgsFeatureIterator fi = mLayer->getFeatures( request );
int indexedCount = 0;
while ( fi.nextFeature( f ) )
{
qDebug( "feature %d", ( int )f.id() );

if ( !f.hasGeometry() )
continue;

@@ -725,6 +729,8 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )
}
}

qDebug( "adding feature to index" );

SpatialIndex::Region r( rect2region( f.geometry().boundingBox() ) );
dataList << new RTree::Data( 0, nullptr, r, f.id() );

@@ -751,6 +757,7 @@ bool QgsPointLocator::rebuildIndex( int maxFeaturesToIndex )

if ( dataList.isEmpty() )
{
qDebug( "empty :(" );
mIsEmptyLayer = true;
return true; // no features
}
@@ -184,6 +184,8 @@ void TestQgsNodeTool::initTestCase()

mCanvas->setLayers( QList<QgsMapLayer*>() << mLayerLine << mLayerPolygon << mLayerPoint );

qDebug( "line layer extent: %s", mLayerLine->extent().toString().toAscii().data() );

// TODO: set up snapping

// create node tool

0 comments on commit 3482a70

Please sign in to comment.