fixes #0003323: Crash when clearing transaction list
This commit is contained in:
@@ -1103,6 +1103,25 @@ class DocumentPlatformCases(unittest.TestCase):
|
||||
FreeCAD.closeDocument("PlatformTests")
|
||||
|
||||
|
||||
class DocumentBacklinks(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.Doc = FreeCAD.newDocument("BackLinks")
|
||||
|
||||
def testIssue0003323(self):
|
||||
self.Doc.UndoMode=1
|
||||
self.Doc.openTransaction("Create object")
|
||||
obj1=self.Doc.addObject("App::FeatureTest","Test1")
|
||||
obj2=self.Doc.addObject("App::FeatureTest","Test2")
|
||||
obj2.Link=obj1
|
||||
self.Doc.commitTransaction()
|
||||
self.Doc.undo()
|
||||
self.Doc.openTransaction("Create object")
|
||||
|
||||
def tearDown(self):
|
||||
# closing doc
|
||||
FreeCAD.closeDocument("BackLinks")
|
||||
|
||||
|
||||
class DocumentFileIncludeCases(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.Doc = FreeCAD.newDocument("FileIncludeTests")
|
||||
|
||||
Reference in New Issue
Block a user