diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py index 66f495a2a71b..a139b0eac374 100644 --- a/src/Mod/Path/PathScripts/PathAreaOp.py +++ b/src/Mod/Path/PathScripts/PathAreaOp.py @@ -96,12 +96,16 @@ def initOperation(self, obj): obj.setEditorMode('PathParams', 2) # hide obj.addProperty("Part::PropertyPartShape", "removalshape", "Path") obj.setEditorMode('removalshape', 2) # hide + + self.setupAdditionalProperties(obj) + + self.initAreaOp(obj) + + def setupAdditionalProperties(self, obj): if not hasattr(obj, 'UseRotation'): obj.addProperty("App::PropertyEnumeration", "UseRotation", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Use rotation to gain access to pockets/areas.")) obj.UseRotation = ['Off', 'A(x)', 'B(y)', 'A & B'] - self.initAreaOp(obj) - def initAreaOp(self, obj): '''initAreaOp(obj) ... overwrite if the receiver class needs initialisation. Can safely be overwritten by subclasses.''' @@ -152,6 +156,9 @@ def opOnDocumentRestored(self, obj): for prop in ['AreaParams', 'PathParams', 'removalshape']: if hasattr(obj, prop): obj.setEditorMode(prop, 2) + + self.setupAdditionalProperties(obj) + self.docRestored = True self.areaOpOnDocumentRestored(obj)