Changed view providers to use Gui.Document.setEdit to start the editor for a new object.
This commit is contained in:
@@ -146,3 +146,5 @@ endif(BUILD_ADDONMGR)
|
||||
if(BUILD_TUX)
|
||||
add_subdirectory(Tux)
|
||||
endif(BUILD_TUX)
|
||||
|
||||
add_subdirectory(LineFollowing)
|
||||
|
||||
@@ -495,7 +495,7 @@ def Create(baseObject, name='DressupTag'):
|
||||
obj = PathDressupTag.Create(baseObject, name)
|
||||
vp = PathDressupTagViewProvider(obj.ViewObject)
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
obj.ViewObject.startEditing()
|
||||
obj.ViewObject.Document.setEdit(obj.ViewObject, 0)
|
||||
return obj
|
||||
|
||||
|
||||
|
||||
@@ -965,7 +965,7 @@ def Create(res):
|
||||
vobj = ViewProvider(obj.ViewObject, res)
|
||||
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
obj.ViewObject.startEditing()
|
||||
obj.ViewObject.Document.setEdit(obj.ViewObject, 0)
|
||||
return obj
|
||||
FreeCAD.ActiveDocument.abortTransaction()
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user