View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004453 | FreeCAD | Bug | public | 2020-10-08 12:13 | 2020-11-21 16:25 |
Reporter | walpa | Assigned To | wmayer | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | pc | OS | Linux | OS Version | Mint 19.3 |
Summary | 0004453: Error triggered when trying to clear the property by the property editor and Link dialog | ||||
Description | When trying to clear the property links in PropertyLinkListGlobal, through the property editor, the exception is thrown: <Exception> type must be 'DocumentObject' or 'DocumentObject' list, not NoneType And the link persists. | ||||
Steps To Reproduce | The attached script shows the situation: - copy the script to the ./FreeCAD/Macro folder - open the FC - run the script - create the link in the "Operates On" property - try removing this link - exception is raised | ||||
Additional Information | Related Forum topic: | ||||
Tags | No tags attached. | ||||
FreeCAD Information | OS: Linux Mint 19.3 (X-Cinnamon/cinnamon) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.22611 (Git) AppImage Build type: Release Branch: master Hash: 7eeec7a5990cc786723225ca8de16ca3186545b3 Python version: 3.8.5 Qt version: 5.12.9 Coin version: 4.0.0 OCC version: 7.4.0 Locale: Portuguese/Brazil (pt_BR) | ||||
|
test_PropertyLinkListGlobal.py (2,669 bytes)
import FreeCAD as App import FreeCADGui as Gui import Part def create(obj_name): """ Object creation method """ obj = App.ActiveDocument.addObject('Part::FeaturePython', obj_name) box(obj) ViewProviderBox(obj.ViewObject) App.ActiveDocument.recompute() return obj class box(): def __init__(self, obj): """ Default constructor """ self.Type = 'box' obj.Proxy = self obj.addProperty("App::PropertyLinkListGlobal", "OperatesOn", "Relations", "") def execute(self, obj): """ Called on document recompute """ obj.Shape = Part.makeBox(1, 1, 1) class ViewProviderBox: def __init__(self, obj): """ Set this object to the proxy object of the actual view provider """ obj.Proxy = self def attach(self, obj): """ Setup the scene sub-graph of the view provider, this method is mandatory """ return def updateData(self, fp, prop): """ If a property of the handled feature has changed we have the chance to handle this here """ return def getDisplayModes(self,obj): """ Return a list of display modes. """ return [] def getDefaultDisplayMode(self): """ Return the name of the default display mode. It must be defined in getDisplayModes. """ return "Shaded" def setDisplayMode(self,mode): """ Map the display mode defined in attach with those defined in getDisplayModes. Since they have the same names nothing needs to be done. This method is optional. """ return mode def onChanged(self, vp, prop): """ Print the name of the property that has changed """ App.Console.PrintMessage("Change property: " + str(prop) + "\n") def getIcon(self): """ Return the icon in XMP format which will appear in the tree view. This method is optional and if not defined a default icon is shown. """ return def __getstate__(self): """ Called during document saving. """ return None def __setstate__(self,state): """ Called during document restore. """ return None App.newDocument("Unnamed") App.ActiveDocument.addObject("Part::Box","Box") App.ActiveDocument.ActiveObject.Label = "Cube" App.ActiveDocument.getObject('Box').Placement = App.Placement(App.Vector(20,0,0),App.Rotation(App.Vector(0,0,1),0)) App.ActiveDocument.recompute() Gui.ActiveDocument.ActiveView.fitAll() create('test') |
|
Excuse me: Related Forum topic: https://forum.freecadweb.org/viewtopic.php?f=3&t=50931 |
|
Confirmed on the forum |
|
I believe I have fixed this with PR 4036: https://github.com/FreeCAD/FreeCAD/pull/4036 |
|
https://github.com/FreeCAD/FreeCAD/commit/031619db277894ce959bdaf64d7e92d826cc47f6 |
|
FreeCAD master 031619db |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-10-08 12:13 | walpa | New Issue | |
2020-10-08 12:13 | walpa | File Added: test_PropertyLinkListGlobal.py | |
2020-10-08 12:16 | walpa | Note Added: 0014793 | |
2020-10-08 13:31 | Kunda1 | Tag Attached: #pending-forum | |
2020-10-08 13:32 | Kunda1 | Status | new => confirmed |
2020-10-08 13:32 | Kunda1 | Note Added: 0014794 | |
2020-10-08 13:32 | Kunda1 | Target Version | => 0.19 |
2020-11-10 03:33 | chennes | Note Added: 0014970 | |
2020-11-18 17:24 | wmayer | Assigned To | => wmayer |
2020-11-18 17:24 | wmayer | Status | confirmed => closed |
2020-11-18 17:24 | wmayer | Resolution | open => fixed |
2020-11-18 17:24 | wmayer | Fixed in Version | => 0.19 |
2020-11-18 17:24 | wmayer | Note Added: 0015005 | |
2020-11-21 16:25 | Kunda1 | Note Added: 0015014 | |
2020-11-21 16:25 | Kunda1 | Changeset attached | => FreeCAD master 031619db |
2020-11-21 16:25 | Kunda1 | Tag Detached: #pending-forum |