diff --git a/libqfieldsync/project.py b/libqfieldsync/project.py index e702bd0..8af25b5 100644 --- a/libqfieldsync/project.py +++ b/libqfieldsync/project.py @@ -21,6 +21,7 @@ def __init__(self): GEOFENCING_ACTIVE = "/geofencingActive" GEOFENCING_LAYER = "/geofencingLayer" GEOFENCING_BEHAVIOR = "/geofencingBehavior" + GEOFENCING_PREVENT_DIGITIZING = "/geofencingPreventDigitizing" class BaseMapType(object): def __init__(self): @@ -144,6 +145,19 @@ def geofencing_behavior(self, value): "qfieldsync", ProjectProperties.GEOFENCING_BEHAVIOR, value ) + @property + def geofencing_prevent_digitizing(self): + geofencing_prevent_digitizing, _ = self.project.readBoolEntry( + "qfieldsync", ProjectProperties.GEOFENCING_PREVENT_DIGITIZING, False + ) + return geofencing_active + + @geofencing_prevent_digitizing.setter + def geofencing_prevent_digitizing(self, value): + self.project.writeEntry( + "qfieldsync", ProjectProperties.GEOFENCING_PREVENT_DIGITIZING, value + ) + @property def geofencing_active(self): geofencing_active, _ = self.project.readBoolEntry(