View Issue Details

IDProjectCategoryView StatusLast Update
0002902FreeCADBugpublic2017-04-02 17:34
ReporterDeepSOICAssigned Towmayer 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Target VersionFixed in Version0.17 
Summary0002902: PyObjectBase notification chain can lead to unexpected changes to document
DescriptionChanging an object behind PropertyLinkSub may cause the link to stick to that object. It's hard to describe, see steps to reproduce.
Steps To Reproduce1. Open the attached file.
It contains a Cube, a Cylinder, and a 3d offset applied to Cylinder.

2. Now, run this in Py console
App.ActiveDocument.Offset.Source # doesn't do anything, huh? But it makes Cylinder think its parent object is Offset!


3. Now this:
App.ActiveDocument.Offset.Source = App.ActiveDocument.Box # move offset over to Box
App.ActiveDocument.recompute()
Now, Offset is applied to Cube instead of cylinder. So far so good.

4. and now this:
App.ActiveDocument.getObject("Cylinder").Placement = App.Placement()
App.ActiveDocument.recompute()
This shouldn't do anything at all. But, Offset is now applied to Cylinder instead of Box!

Additional Informationforum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20597&p=159579#p159579

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9933 (Git)
Build type: Release
Branch: master
Hash: 6c3b78e97bbb8653e1189038c99682becef71626
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0

Note that it's important to obtain Cylinder object not as an attribute. I used getObject() method here, but the reference may also come from getSelection().

TagsNo tags attached.

Relationships

related to 0002996 closedwmayer PyObjectBase notification chain can lead to unexpected changes to document 

Activities

DeepSOIC

2017-02-12 18:20

developer  

link-change-example.FCStd (Attachment missing)

Issue History

Date Modified Username Field Change
2017-02-12 18:20 DeepSOIC New Issue
2017-02-12 18:20 DeepSOIC File Added: link-change-example.FCStd
2017-02-12 18:22 DeepSOIC Additional Information Updated View Revisions
2017-02-13 23:32 wmayer Changeset attached => FreeCAD Master master b72aa9f3
2017-02-13 23:33 wmayer Status new => closed
2017-02-13 23:33 wmayer Assigned To => wmayer
2017-02-13 23:33 wmayer Resolution open => fixed
2017-02-13 23:33 wmayer Fixed in Version => 0.17
2017-02-14 15:44 wmayer Changeset attached => FreeCAD Master master 4f23b569
2017-02-14 15:44 wmayer Changeset attached => FreeCAD Master master 19111f1e
2017-02-14 15:44 wmayer Changeset attached => FreeCAD Master master f4d8945d
2017-04-02 17:34 DeepSOIC Relationship added related to 0002996