Skip to content

Commit

Permalink
Remove unused SnapToMapMode in QgsSnappingUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 14, 2017
1 parent f5f0a29 commit 8333b71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
5 changes: 5 additions & 0 deletions doc/api_break.dox
Expand Up @@ -2123,6 +2123,11 @@ QgsSnapper {#qgis_api_break_3_0_QgsSnapper}
- Constructor variant with QgsMapRenderer has been removed. Use the variant with QgsMapSettings.
- Signature for snapPoint() has changed.

QgsSnappingUtils {#qgis_api_break_3_0_QgsSnappingUtils}
----------------

- Snapping mode moved to QgsSnappingConfig

QgsSpatialIndex {#qgis_api_break_3_0_QgsSpatialIndex}
---------------

Expand Down
8 changes: 0 additions & 8 deletions python/core/qgssnappingutils.sip
Expand Up @@ -81,13 +81,6 @@ The current layer used if mode is SnapCurrentLayer
%End


enum SnapToMapMode
{
SnapCurrentLayer,
SnapAllLayers,
SnapAdvanced,
};

enum IndexingStrategy
{
IndexAlwaysFull,
Expand Down Expand Up @@ -120,7 +113,6 @@ snapping_layer1 = QgsSnappingUtils.LayerConfig(layer1, QgsPointLocator.Vertex, 1
snapping_layer2 = QgsSnappingUtils.LayerConfig(layer2, QgsPointLocator.Vertex and QgsPointLocator.Edge, 10, QgsTolerance.Pixels)

snapper.setLayers([snapping_layer1, snapping_layer2])
snapper.setSnapToMapMode(QgsSnappingUtils.SnapAdvanced)
```

\param l The vector layer for which this configuration is
Expand Down
11 changes: 1 addition & 10 deletions src/core/qgssnappingutils.h
Expand Up @@ -58,7 +58,7 @@ class CORE_EXPORT QgsSnappingUtils : public QObject
//! Get a point locator for the given layer. If such locator does not exist, it will be created
QgsPointLocator *locatorForLayer( QgsVectorLayer *vl );

//! Snap to map according to the current configuration (mode). Optional filter allows discarding unwanted matches.
//! Snap to map according to the current configuration. Optional filter allows discarding unwanted matches.
QgsPointLocator::Match snapToMap( QPoint point, QgsPointLocator::MatchFilter *filter = nullptr );
QgsPointLocator::Match snapToMap( const QgsPointXY &pointMap, QgsPointLocator::MatchFilter *filter = nullptr );

Expand All @@ -78,14 +78,6 @@ class CORE_EXPORT QgsSnappingUtils : public QObject

// configuration

//! modes for "snap to background"
enum SnapToMapMode
{
SnapCurrentLayer, //!< Snap just to current layer (tolerance and type from defaultSettings())
SnapAllLayers, //!< Snap to all rendered layers (tolerance and type from defaultSettings())
SnapAdvanced, //!< Snap according to the configuration set in setLayers()
};

enum IndexingStrategy
{
IndexAlwaysFull, //!< For all layers build index of full extent. Uses more memory, but queries are faster.
Expand Down Expand Up @@ -115,7 +107,6 @@ class CORE_EXPORT QgsSnappingUtils : public QObject
snapping_layer2 = QgsSnappingUtils.LayerConfig(layer2, QgsPointLocator.Vertex and QgsPointLocator.Edge, 10, QgsTolerance.Pixels)
snapper.setLayers([snapping_layer1, snapping_layer2])
snapper.setSnapToMapMode(QgsSnappingUtils.SnapAdvanced)
```
* \param l The vector layer for which this configuration is
Expand Down

0 comments on commit 8333b71

Please sign in to comment.