Skip to content

Commit

Permalink
More travis debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Mar 29, 2017
1 parent 4f339cb commit 3482a70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgspointlocator.cpp
Expand Up @@ -673,6 +673,7 @@ bool QgsPointLocator::hasIndex() const

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

QLinkedList<RTree::Data *> dataList;
Expand All @@ -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;

Expand All @@ -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() );

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

if ( dataList.isEmpty() )
{
qDebug( "empty :(" );
mIsEmptyLayer = true;
return true; // no features
}
Expand Down
2 changes: 2 additions & 0 deletions tests/src/app/testqgsnodetool.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 3482a70

Please sign in to comment.