Restore ViewObject implementation for all Draft objects

In my tests the code works fine. Using @AIRCAP's instructions,  I have created a 'broken' file from draft_test_objects.FCStd.
This commit is contained in:
Roy-043
2024-10-24 15:24:13 +02:00
parent 8c4d696180
commit 0fac810797
24 changed files with 226 additions and 94 deletions

View File

@@ -27,10 +27,11 @@
## \addtogroup draftobjects
# @{
import FreeCAD as App
from PySide.QtCore import QT_TRANSLATE_NOOP
import FreeCAD as App
from draftutils import gui_utils
class WorkingPlaneProxy:
"""The Draft working plane proxy object"""
@@ -48,6 +49,11 @@ class WorkingPlaneProxy:
self.Type = "WorkingPlaneProxy"
def onDocumentRestored(self, obj):
gui_utils.restore_view_object(
obj, vp_module="view_wpproxy", vp_class="ViewProviderWorkingPlaneProxy", format=False
)
def execute(self,obj):
import Part
l = 1