[Solved] 0.19pre PartWB, Attachment >Apply, donnot work

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by openBrain »

wmayer wrote: Mon Mar 23, 2020 4:23 pm git commit bd0f5ca5c
:+1:
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by wmayer »

wmayer wrote: Mon Mar 23, 2020 4:23 pm However, I still encounter a weird problem: undo & redo works exactly 5 times and after doing undo the 6th time the placement of the object is not set correctly any more.
Doing a bit more testing it looks like that only the C++ version of the attachment dialog suffers from this problem while with the Python version I don't get it.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by DeepSOIC »

wmayer wrote: Mon Mar 23, 2020 4:33 pm Doing a bit more testing it looks like that only the C++ version of the attachment dialog suffers from this problem while with the Python version I don't get it.
Could it be that attachment reacts to changes to individual properties (onChanged) during the transaction unrolling/rerolling?
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by wmayer »

DeepSOIC wrote: Mon Mar 23, 2020 7:38 pm Could it be that attachment reacts to changes to individual properties (onChanged) during the transaction unrolling/rerolling?
If that was the case it would be really bad because it would mean that the whole transaction mechanism is flawed now.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by wmayer »

openBrain wrote: Mon Mar 23, 2020 9:59 am While native Attachment editor (through Property Editor / MapMode) is now fully expression aware, the one from Part menu isn't at all.
git commit 3a0d9e8c5
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by DeepSOIC »

wmayer wrote: Wed Mar 25, 2020 7:01 pm git commit 3a0d9e8c5
Ah, that's how it's done [expression support in python task dialogs]! good to know, thanks!!
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by fc_tofu »

wmayer wrote: Wed Mar 25, 2020 7:01 pm ...
git commit 3a0d9e8c5
@wmayer, your new fix doesnot work on my machine. Please give a check.
fsc_2020-03-26_050322.jpg
fsc_2020-03-26_050322.jpg (25.85 KiB) Viewed 492 times
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20052 (Git)
Build type: Release
Branch: master
Hash: 6291921e9abe737e4440ff5814ca58547defadef
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Chinese/China (zh_CN)
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [PR] 0.19pre PartWB, Attachment >Apply, donnot work

Post by wmayer »

The actual binding was implemented with git commit ce3eadf289b
It's not possible to only override TaskAttachmentEditor.py without having rebuilt the FreeCADGui.dll.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 0.19pre PartWB, Attachment >Apply, donnot work

Post by wmayer »

DeepSOIC wrote: Wed Mar 25, 2020 7:17 pm
wmayer wrote: Wed Mar 25, 2020 7:01 pm git commit 3a0d9e8c5
Ah, that's how it's done [expression support in python task dialogs]! good to know, thanks!!
For the sake of completeness: the binding has been implemented only one day before with git commit ce3eadf289b

Afterwards I stumbled across the function https://github.com/FreeCAD/FreeCAD/blob ... x.cpp#L308 and how it can be used
https://github.com/FreeCAD/FreeCAD/blob ... Gui.py#L87
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: [PR] 0.19pre PartWB, Attachment >Apply, donnot work

Post by fc_tofu »

wmayer wrote: Thu Mar 26, 2020 7:14 am The actual binding was implemented with git commit ce3eadf289b
It's not possible to only override TaskAttachmentEditor.py without having rebuilt the FreeCADGui.dll.
Thanks, got it.
Post Reply