[Solved] 0.19pre PartWB, Attachment >Apply, donnot work
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
- 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
As for apply button - yes, it's my screwup, restarting transaction from there makes sense. Removing the apply button altogether is also an option.
Re: 0.19pre PartWB, Attachment >Apply, donnot work
Thank you. I tried above fix, but cannont find difference between "OK" and fixed "Apply".
As my understanding, "Apply" change source object position, but leave "map mode/attachment mode" untouched (or reset). Or say, "Apply" could work as non-parametric alignment.
Please correct me, if I am wrong here.
- 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
Apply was made to record the state of attachment to the object. Then you can change something, and click Cancel, and the changes will be reverted to those written when you clicked "Apply".
This is something that deserves a special button maybe. "Apply" doesn't imply that, in my opinion.
Re: 0.19pre PartWB, Attachment >Apply, donnot work
Thank you, got it.
"Cancel" button misfunction in "Native" Attachment editor still need another fix, what's your opinion?
Last edited by fc_tofu on Mon Mar 23, 2020 3:57 pm, edited 1 time in total.
Re: 0.19pre PartWB, Attachment >Apply, donnot work
Yep, that's what it induces. Because no Undo transaction is opened, neither Cancel, nor Undo after OK works correctly. I'm preparing a PR as @wmayer jumped over this.
Re: 0.19pre PartWB, Attachment >Apply, donnot work
Are you sure about that?
In any case, Werner did what I suggested, commit and open again, git commit c32c9d565.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: 0.19pre PartWB, Attachment >Apply, donnot work
I'm sure. The problem I'm talking about lies in https://github.com/FreeCAD/FreeCAD/blob ... tacher.cpp
Re: 0.19pre PartWB, Attachment >Apply, donnot work
git commit bd0f5ca5c
Obviously there is a regression compared to v0.18 because there it opened a transaction. It looks like the auto-transaction mechanism is not technically mature.
In order to get the undo/redo working as expected I had to remove the check whether the AttachmentOffset is touched and the property MapPathParameter must be explicitly set too.
Now it works to reject the dialog or when accepting it then undo & redo works. 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.
I have reported this in https://tracker.freecadweb.org/view.php?id=4265#c14271