CAM: Drilling - Retract mode readonly

This commit is contained in:
tarman3
2025-05-30 00:23:38 +03:00
parent e6bcda81a1
commit 34b449bd0c

View File

@@ -160,7 +160,7 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
"Drill",
QT_TRANSLATE_NOOP(
"App::Property",
"Controls tool retract height between holes in same op, Default=G98: safety height",
"Controls tool retract height between holes in same op, Default=G98: safety height\nUse property KeepToolDown to change this",
),
)
obj.addProperty(
@@ -194,6 +194,8 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
QT_TRANSLATE_NOOP("App::Property", "Use G85 boring cycle with feed out"),
)
obj.setEditorMode("RetractMode", 1) # Set property read-only
for n in self.propertyEnumerations():
setattr(obj, n[0], n[1])
@@ -236,9 +238,10 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
"Drill",
QT_TRANSLATE_NOOP(
"App::Property",
"Controls tool retract height between holes in same op, Default=G98: safety height",
"Controls tool retract height between holes in same op, Default=G98: safety height\nUse property KeepToolDown to change this",
),
)
obj.setEditorMode("RetractMode", 1) # Set property read-only
# ensure new enums exist in old class
for n in self.propertyEnumerations():
setattr(obj, n[0], n[1])