Skip to content
Permalink
Browse files

fix snapping test

  • Loading branch information
nirvn committed Dec 7, 2016
1 parent 8e14780 commit 9afb48eccda4acb2cf9a4535925aec57d2ae6a90
Showing with 5 additions and 0 deletions.
  1. +3 −0 tests/src/core/testqgssnappingutils.cpp
  2. +2 −0 tests/src/python/test_layer_dependencies.py
@@ -141,6 +141,7 @@ class TestQgsSnappingUtils : public QObject
QgsSnappingUtils u;
QgsSnappingConfig snappingConfig = u.config();
u.setMapSettings( mapSettings );
snappingConfig.setEnabled( true );
snappingConfig.setMode( QgsSnappingConfig::AllLayers );
u.setConfig( snappingConfig );

@@ -168,6 +169,7 @@ class TestQgsSnappingUtils : public QObject
QgsSnappingUtils u;
QgsSnappingConfig snappingConfig = u.config();
u.setMapSettings( mapSettings );
snappingConfig.setEnabled( true );
snappingConfig.setMode( QgsSnappingConfig::AdvancedConfiguration );
snappingConfig.setIndividualLayerSettings( mVL, QgsSnappingConfig::IndividualLayerSettings( true, QgsSnappingConfig::Vertex, 10, QgsTolerance::Pixels ) );
u.setConfig( snappingConfig );
@@ -214,6 +216,7 @@ class TestQgsSnappingUtils : public QObject
QgsSnappingUtils u;
u.setMapSettings( mapSettings );
QgsSnappingConfig snappingConfig = u.config();
snappingConfig.setEnabled( true );
snappingConfig.setMode( QgsSnappingConfig::AdvancedConfiguration );
QgsSnappingConfig::IndividualLayerSettings layerSettings( true, QgsSnappingConfig::Vertex, 0.1, QgsTolerance::ProjectUnits );
snappingConfig.setIndividualLayerSettings( vl, layerSettings );
@@ -113,6 +113,7 @@ def test_resetSnappingIndex(self):
u = QgsSnappingUtils()
u.setMapSettings(ms)
cfg = u.config()
cfg.setEnabled(True)
cfg.setMode(QgsSnappingConfig.AdvancedConfiguration)
cfg.setIndividualLayerSettings(self.pointsLayer,
QgsSnappingConfig.IndividualLayerSettings(True,
@@ -235,6 +236,7 @@ def test_signalConnection(self):
u = QgsSnappingUtils()
u.setMapSettings(ms)
cfg = u.config()
cfg.setEnabled(True)
cfg.setMode(QgsSnappingConfig.AdvancedConfiguration)
cfg.setIndividualLayerSettings(self.pointsLayer,
QgsSnappingConfig.IndividualLayerSettings(True,

0 comments on commit 9afb48e

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