App::Link: the big merge

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: App::Link: the big merge: Reverting crashes FreeCAD

Post by realthunder »

chrisb wrote: Tue Sep 03, 2019 7:10 am Reverting of some models still crashes FreeCAD. Other models are ok.
PR submitted here
Try Assembly3 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
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: App::Link: the big merge

Post by triplus »

I guess Tree and Property view got disabled by default?

https://forum.freecadweb.org/viewtopic. ... 40#p331707
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: App::Link: the big merge: Reverting crashes FreeCAD

Post by wmayer »

realthunder wrote: Wed Sep 04, 2019 5:04 am
chrisb wrote: Tue Sep 03, 2019 7:10 am Reverting of some models still crashes FreeCAD. Other models are ok.
PR submitted here
Is there a reason why reverting a document should automatically make it active? When doing so from the GUI then it's anyway active but I doubt when running it from Python it's good idea to do it because this causes unexpected side-effects.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: App::Link: the big merge: Reverting crashes FreeCAD

Post by realthunder »

wmayer wrote: Wed Sep 04, 2019 8:14 pm Is there a reason why reverting a document should automatically make it active? When doing so from the GUI then it's anyway active but I doubt when running it from Python it's good idea to do it because this causes unexpected side-effects.
Previously, reverting a document signals deletion of every objects. However, for external links, object deletion and document close has different meaning. So I change it to signal document close. It's more efficient anyway. Then we need the matching new document signal. And follows the convention, I set this 'new' document to be active. I can of course check to see if this is the active document before reverting and set it back only if it is. How's that?
Try Assembly3 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
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: App::Link: the big merge: Reverting crashes FreeCAD

Post by realthunder »

wmayer wrote: Wed Sep 04, 2019 8:14 pm Is there a reason why reverting a document should automatically make it active?
I have added a commit to check active document before reverting.

BTW, I will be on holiday till 15th, so may not be as responsive.
Try Assembly3 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
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: App::Link: the big merge: Reverting crashes FreeCAD

Post by chrisb »

realthunder wrote: Thu Sep 05, 2019 1:50 am BTW, I will be on holiday till 15th, so may not be as responsive.
Have nice holidays, and recover from all the work done here!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: App::Link: the big merge

Post by wmayer »

BTW, I will be on holiday till 15th, so may not be as responsive.
Enjoy your free days. I think you have deserved it :)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: App::Link: the big merge

Post by triplus »

I have seen a lot of accumulated App::Link related PRs, in-depth code reviews, people from discovering issues and reporting it, to asking what is it all about, to demanding there should be more of it. A small mention in BIM related area has been observed! Therefore i guess it's on the radar, and some possible feedback and suggestion might happen in the future in that area too. All in all thanks to all involved in making it happen and investing such amounts of effort in it. Should i guess be in optimal condition by FreeCAD 0.19 release time.

Have a nice holidays!
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: App::Link: the big merge

Post by freedman »

Not technical feedback but I have always noticed a difference in color and light levels between all prior (to 0.19) versions of FreeCAD and realthunders code. I can tell you immediately if I open Assembly3 or regular FreeCAD, I don't get it. I see the same thing now when I start 0.19, it's like the overhead light is turned off and things are dim and the colors are different. Like I said, not very technical.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: App::Link: the big merge: Reverting crashes FreeCAD

Post by wmayer »

realthunder wrote: Wed Sep 04, 2019 11:25 pm
wmayer wrote: Wed Sep 04, 2019 8:14 pm Is there a reason why reverting a document should automatically make it active? When doing so from the GUI then it's anyway active but I doubt when running it from Python it's good idea to do it because this causes unexpected side-effects.
Previously, reverting a document signals deletion of every objects. However, for external links, object deletion and document close has different meaning. So I change it to signal document close. It's more efficient anyway. Then we need the matching new document signal. And follows the convention, I set this 'new' document to be active. I can of course check to see if this is the active document before reverting and set it back only if it is. How's that?
That looks ok to me. Btw, we could add an explicit signal to clear a document (as it was said in a TODO comment in the restore() function) because when signalling to delete a document many dialog observers close themselves which might be unnecessary in some cases.
Post Reply