@@ -1679,7 +1679,7 @@ void QgsProject::setSnapSettingsForLayer( const QString& layerId, bool enabled,
1679
1679
}
1680
1680
1681
1681
bool QgsProject::snapSettingsForLayer ( const QString& layerId, bool & enabled, QgsSnapper::SnappingType &type, QgsTolerance::UnitType& units, double & tolerance,
1682
- bool & avoidIntersection )
1682
+ bool & avoidIntersection ) const
1683
1683
{
1684
1684
QStringList layerIdList, enabledList, snapTypeList, toleranceUnitList, toleranceList, avoidIntersectionList;
1685
1685
snapSettings ( layerIdList, enabledList, snapTypeList, toleranceUnitList, toleranceList, avoidIntersectionList );
@@ -1735,7 +1735,7 @@ bool QgsProject::snapSettingsForLayer( const QString& layerId, bool& enabled, Qg
1735
1735
}
1736
1736
1737
1737
void QgsProject::snapSettings ( QStringList& layerIdList, QStringList& enabledList, QStringList& snapTypeList, QStringList& toleranceUnitList, QStringList& toleranceList,
1738
- QStringList& avoidIntersectionList )
1738
+ QStringList& avoidIntersectionList ) const
1739
1739
{
1740
1740
layerIdList = readListEntry ( " Digitizing" , " /LayerSnappingList" );
1741
1741
enabledList = readListEntry ( " Digitizing" , " /LayerSnappingEnabledList" );
@@ -1745,6 +1745,17 @@ void QgsProject::snapSettings( QStringList& layerIdList, QStringList& enabledLis
1745
1745
avoidIntersectionList = readListEntry ( " Digitizing" , " /AvoidIntersectionsList" );
1746
1746
}
1747
1747
1748
+ void QgsProject::setTopologicalEditing ( bool enabled )
1749
+ {
1750
+ QgsProject::instance ()->writeEntry ( " Digitizing" , " /TopologicalEditing" , ( enabled ? 1 : 0 ) );
1751
+ emit snapSettingsChanged ();
1752
+ }
1753
+
1754
+ bool QgsProject::topologicalEditing () const
1755
+ {
1756
+ return ( QgsProject::instance ()->readNumEntry ( " Digitizing" , " /TopologicalEditing" , 0 ) > 0 );
1757
+ }
1758
+
1748
1759
void QgsProjectBadLayerDefaultHandler::handleBadLayers ( QList<QDomNode> /* layers*/ , QDomDocument /* projectDom*/ )
1749
1760
{
1750
1761
// just ignore any bad layers
0 commit comments