View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002766 | Expressions | Bug | public | 2016-11-11 09:23 | 2021-02-06 06:30 |
Reporter | FFW | Assigned To | eivindkvedalen | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Platform | x86-64 | OS | Linux Debian | OS Version | 4.8.0-1-amd64 |
Product Version | 0.16 | ||||
Target Version | 0.20 | ||||
Summary | 0002766: Expression link is cuting by creating new object | ||||
Description | When using an expression linked to a certain object, creating another object with a close name cause the link to switch to this last created. | ||||
Steps To Reproduce | - Create a Part Design/Cube, named Cube by default - Create another object - Link a property of this object to Cube.Length - Create another Part Design/Cube, named Cube001 by default - Show the property of the object, it is now linked to Cube001.Length and break the model. | ||||
Tags | expressions | ||||
FreeCAD Information | |||||
|
Hint: this only happens with using the Label value of an object (Cube). When using its internal name (in this case "Box") it works correctly. The same problem still exists in 0.17. |
|
This happens because the GUI tries to assign e.g 'Cube' to the second object when it is created. This in turn triggers a relabelObject signal, and the expression engine happily renames the expression when the GUI changes the label because duplicate labels are not allowed (before this happens there are two object with the label 'Cube'; this is why it can be renamed to Cube001; not sure why this is so predictable, though). Not sure how to fix this, because I also found another thing that probably should be looked into first: The "Allow duplicate label" handling is done in the Gui part of FreeCAD. Shouldn't this really be in the App part? |
|
> Shouldn't this really be in the App part? True, since ObjectLabelObserver anyway only accesses App stuff this class could be moved to FreeCADApp. |
|
See also: https://forum.freecadweb.org/viewtopic.php?f=10&t=24839&p=195041 https://forum.freecadweb.org/viewtopic.php?f=10&t=24595&p=194633#p194633 |
|
This ticket has been migrated to GitHub as issue 5672. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-11-11 09:23 | FFW | New Issue | |
2016-11-11 12:23 | wmayer | Note Added: 0007447 | |
2016-11-11 12:23 | wmayer | Status | new => confirmed |
2016-11-11 21:06 | eivindkvedalen | Assigned To | => eivindkvedalen |
2016-11-11 21:06 | eivindkvedalen | Status | confirmed => assigned |
2016-11-13 21:55 | eivindkvedalen | Note Added: 0007452 | |
2016-11-14 17:53 | wmayer | Note Added: 0007453 | |
2017-05-07 15:01 | Kunda1 | Tag Attached: expressions | |
2017-10-11 12:52 | wmayer | Note Added: 0010291 | |
2017-12-13 15:29 | Kunda1 | Project | FreeCAD => Expressions |
2019-02-25 13:38 | Kunda1 | Target Version | => 0.19 |
2021-02-06 06:30 | abdullah | Target Version | => 0.20 |