From a68bc0612d4f71e622a429a512fa2a1980779638 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Thu, 4 Oct 2018 20:52:25 -0700 Subject: [PATCH] Changed view providers to use Gui.Document.setEdit to start the editor for a new object. --- src/Mod/CMakeLists.txt | 2 ++ src/Mod/Path/PathScripts/PathDressupTagGui.py | 2 +- src/Mod/Path/PathScripts/PathOpGui.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/CMakeLists.txt b/src/Mod/CMakeLists.txt index a6906e165b..dcc85d0426 100644 --- a/src/Mod/CMakeLists.txt +++ b/src/Mod/CMakeLists.txt @@ -146,3 +146,5 @@ endif(BUILD_ADDONMGR) if(BUILD_TUX) add_subdirectory(Tux) endif(BUILD_TUX) + +add_subdirectory(LineFollowing) diff --git a/src/Mod/Path/PathScripts/PathDressupTagGui.py b/src/Mod/Path/PathScripts/PathDressupTagGui.py index c6af37e8fe..b8d66741fd 100644 --- a/src/Mod/Path/PathScripts/PathDressupTagGui.py +++ b/src/Mod/Path/PathScripts/PathDressupTagGui.py @@ -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 diff --git a/src/Mod/Path/PathScripts/PathOpGui.py b/src/Mod/Path/PathScripts/PathOpGui.py index a7aaff2a37..6bb4f2ccd0 100644 --- a/src/Mod/Path/PathScripts/PathOpGui.py +++ b/src/Mod/Path/PathScripts/PathOpGui.py @@ -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