mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
This commit adds a new avoid intersection mode setting when digitizing new features. The three available modes are: - allow intersections/overlaps - avoid intersections/overlaps on active layer - avoid intersectonss/overlaps on layers list The third mode is what QGIS has had for a while, except its UI/UX is a bit messy. The layers list is setup by the user via the advanced snapping configuration widgets, but isn't connected at all with whether snapping is enabled / disabled. This new approach makes it explicit to user whether newly-added features might be clipped or not, and if so by which layer(s). Finally, the new 'avoid intersections/overlaps on active layer' is likely a far more useful behavior than having a list of layers (for e.g., you might be digitizing on a layer that can't have overlap with itself but is fine to overlap with another layer, the latter also in need of avoid overlap _with itself_).
22 lines
2.5 KiB
Python
22 lines
2.5 KiB
Python
# The following has been generated automatically from src/core/qgsproject.h
|
|
# monkey patching scoped based enum
|
|
QgsProject.FlagDontResolveLayers = QgsProject.ReadFlag.FlagDontResolveLayers
|
|
QgsProject.ReadFlag.FlagDontResolveLayers.__doc__ = "Don't resolve layer paths (i.e. don't load any layer content). Dramatically improves project read time if the actual data from the layers is not required."
|
|
QgsProject.FlagDontLoadLayouts = QgsProject.ReadFlag.FlagDontLoadLayouts
|
|
QgsProject.ReadFlag.FlagDontLoadLayouts.__doc__ = "Don't load print layouts. Improves project read time if layouts are not required, and allows projects to be safely read in background threads (since print layouts are not thread safe)."
|
|
QgsProject.ReadFlag.__doc__ = 'Flags which control project read behavior.\n\n.. versionadded:: 3.10\n\n' + '* ``FlagDontResolveLayers``: ' + QgsProject.ReadFlag.FlagDontResolveLayers.__doc__ + '\n' + '* ``FlagDontLoadLayouts``: ' + QgsProject.ReadFlag.FlagDontLoadLayouts.__doc__
|
|
# --
|
|
# monkey patching scoped based enum
|
|
QgsProject.FileFormat.Qgz.__doc__ = "Archive file format, supports auxiliary data"
|
|
QgsProject.FileFormat.Qgs.__doc__ = "Project saved in a clear text, does not support auxiliary data"
|
|
QgsProject.FileFormat.__doc__ = 'Flags which control project read behavior.\n\n.. versionadded:: 3.12\n\n' + '* ``Qgz``: ' + QgsProject.FileFormat.Qgz.__doc__ + '\n' + '* ``Qgs``: ' + QgsProject.FileFormat.Qgs.__doc__
|
|
# --
|
|
QgsProject.FileFormat.baseClass = QgsProject
|
|
# monkey patching scoped based enum
|
|
QgsProject.AvoidIntersectionsMode.AllowIntersections.__doc__ = "Overlap with any feature allowed when digitizing new features"
|
|
QgsProject.AvoidIntersectionsMode.AvoidIntersectionsCurrentLayer.__doc__ = "Overlap with features from the active layer when digitizing new features not allowed"
|
|
QgsProject.AvoidIntersectionsMode.AvoidIntersectionsLayers.__doc__ = "Overlap with features from a specified list of layers when digitizing new features not allowed"
|
|
QgsProject.AvoidIntersectionsMode.__doc__ = 'Flags which control how intersections of pre-existing feature are handled when digitizing new features.\n\n.. versionadded:: 3.14\n\n' + '* ``AllowIntersections``: ' + QgsProject.AvoidIntersectionsMode.AllowIntersections.__doc__ + '\n' + '* ``AvoidIntersectionsCurrentLayer``: ' + QgsProject.AvoidIntersectionsMode.AvoidIntersectionsCurrentLayer.__doc__ + '\n' + '* ``AvoidIntersectionsLayers``: ' + QgsProject.AvoidIntersectionsMode.AvoidIntersectionsLayers.__doc__
|
|
# --
|
|
QgsProject.AvoidIntersectionsMode.baseClass = QgsProject
|