Skip to content

Commit 57d52db

Browse files
committed
More travis debugging
1 parent f44200e commit 57d52db

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/app/nodetool/qgsnodetool2.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,14 @@ QgsPointLocator::Match QgsNodeTool2::snapToEditableLayer( QgsMapMouseEvent *e )
474474
{
475475
QgsPoint mapPoint = toMapCoordinates( e->pos() );
476476
double tol = QgsTolerance::vertexSearchRadius( canvas()->mapSettings() );
477+
qDebug( "snap: pt %f,%f tol %f", mapPoint.x(), mapPoint.y(), tol );
477478

478479
QgsSnappingConfig config( QgsProject::instance() );
479480
config.setEnabled( true );
480481
config.setMode( QgsSnappingConfig::AdvancedConfiguration );
481482
config.setIntersectionSnapping( false ); // only snap to layers
482483

484+
qDebug( "canvas layers: %d", canvas()->layers().count() );
483485
Q_FOREACH ( QgsMapLayer* layer, canvas()->layers() )
484486
{
485487
QgsVectorLayer* vlayer = qobject_cast<QgsVectorLayer*>( layer );
@@ -488,6 +490,7 @@ QgsPointLocator::Match QgsNodeTool2::snapToEditableLayer( QgsMapMouseEvent *e )
488490

489491
config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings(
490492
true, QgsSnappingConfig::VertexAndSegment, tol, QgsTolerance::ProjectUnits ) );
493+
qDebug( "will use layer %s tolerance %f", vlayer->name().toAscii().data(), tol );
491494
}
492495

493496
QgsSnappingUtils* snapUtils = canvas()->snappingUtils();
@@ -733,11 +736,13 @@ void QgsNodeTool2::startDragging( QgsMapMouseEvent *e )
733736
QgsPoint mapPoint = toMapCoordinates( e->pos() );
734737
if ( isNearEndpointMarker( mapPoint ) )
735738
{
739+
qDebug( "start drag at endpoint" );
736740
startDraggingAddVertexAtEndpoint( mapPoint );
737741
return;
738742
}
739743

740744
QgsPointLocator::Match m = snapToEditableLayer( e );
745+
qDebug( "match type: %d", m.type() );
741746
if ( !m.isValid() )
742747
return;
743748

@@ -747,6 +752,7 @@ void QgsNodeTool2::startDragging( QgsMapMouseEvent *e )
747752
// adding a new vertex instead of moving a vertex
748753
if ( m.hasEdge() )
749754
{
755+
qDebug( "dragging edge!" );
750756
// only start dragging if we are near edge center
751757
mapPoint = toMapCoordinates( e->pos() );
752758
bool isNearCenter = matchEdgeCenterTest( m, mapPoint );
@@ -757,6 +763,7 @@ void QgsNodeTool2::startDragging( QgsMapMouseEvent *e )
757763
}
758764
else // vertex
759765
{
766+
qDebug( "dragging vertex!" );
760767
startDraggingMoveVertex( e->mapPoint(), m );
761768
}
762769
}

0 commit comments

Comments
 (0)