Possible bug when undoing movement of obj from one part to another

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
carlopav
Posts: 290
Joined: Mon Dec 31, 2018 1:49 pm

Possible bug when undoing movement of obj from one part to another

Postby carlopav » Tue Nov 05, 2019 5:02 pm

Hello, I'm writing cause I noticed a strange behaviour in the attached file:
- open the file
- move one object from one part to the other with drag and drop
- press Ctrl-Z to undo
- the object appears twice in the 3dview and it's selectable in both positions, also if console returns the following error:

Code: Select all

5.13e-07 Tree.cpp(4119): [ComboView] sub object not found Part.Box.
1.20458 Tree.cpp(4119): [ComboView] sub object not found Part.Box.
Thanks

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18629 (Git)
Build type: Release
Branch: master
Hash: bb1aec9e60faa8b279306bfebe672b8d4e77351d
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
Attachments
prova.FCStd
(63.04 KiB) Downloaded 1 time
XH6MgSWHc2.gif
XH6MgSWHc2.gif (136.92 KiB) Viewed 139 times
vocx
Posts: 1590
Joined: Thu Oct 18, 2018 9:18 pm

Re: Possible bug when undoing movement of obj from one part to another

Postby vocx » Wed Nov 06, 2019 9:45 pm

Yes, I can reproduce. It's probably some realthunder magic.

You should make a simple example, with only two Std Parts and a simple Part Box.
AppPart_two_objects.png
AppPart_two_objects.png (34.57 KiB) Viewed 104 times

Code: Select all

OS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18686
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
carlopav
Posts: 290
Joined: Mon Dec 31, 2018 1:49 pm

Re: Possible bug when undoing movement of obj from one part to another

Postby carlopav » Sun Nov 10, 2019 8:18 am

Thanks Vox for the suggestion.
realthunder wrote: ping
Hi realthunder, glad if you have the time to throw some light on that.
Here are the steps to reproduce the bug:
- open file
- move Cube001 from Part to Part001 with dragAndDrop in the tree
- move back Cube001 from Part001 to Part with dragAndDrop in the tree
- undo with Ctrl-Z
- two cubes appear in the 3dview, both referring to Cube001
- the console displays:

Code: Select all

5.13e-07 Tree.cpp(4119): [ComboView] sub object not found Part.Box001.
Attachments
Bug_undomovebox.FCStd
(7.52 KiB) Downloaded 1 time
realthunder
Posts: 1188
Joined: Tue Jan 03, 2017 10:55 am

Re: Possible bug when undoing movement of obj from one part to another

Postby realthunder » Mon Nov 11, 2019 1:06 am

carlopav wrote:
Sun Nov 10, 2019 8:18 am
Hi realthunder, glad if you have the time to throw some light on that.
Problem confirmed. Will fix soon.
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal