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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user