Restore toolbars for default workbench on FreeCAD start
I just updated and this works as expected on Win.
I suggest that this is added to "https://github.com/FreeCAD/FreeCAD-addons"
Maybe this can also serve as a test for @Mandeep_Singh's work on the plugin manager.
I will definitely advertise this, as it comes up quite frequently in the forum.
Thanks triplus very nice feature.
Restore toolbars for default workbench on FreeCAD start
I just updated and this works as expected on Win.
I suggest that this is added to "https://github.com/FreeCAD/FreeCAD-addons"
Maybe this can also serve as a test for @Mandeep_Singh's work on the plugin manager.
I will definitely advertise this, as it comes up quite frequently in the forum.
Thanks triplus very nice feature.
You're welcome and yes for sure it can be added there. What is the procedure to do that?
triplus wrote:You're welcome and yes for sure it can be added there. What is the procedure to do that?
I think you can either ask Yorik here in the forum or open an issue at the FreeCAD-addons repo requesting inclusion. It would be good to find a way to help Yorik with this. I saw your post in viewtopic.php?f=10&t=15926&start=20#p134609 I trust Yorik's judgement explicitly, but as the number of addons increases it places a even greater burden on him. A way to pre-screen these requests before submitting to yorik would be valuable IMHO. This is of course what you have done, but inexplicably there hasn't been much traffic? The functionality is often requested on the forum.
sgrogan wrote:I think you can either ask Yorik here in the forum or open an issue at the FreeCAD-addons repo requesting inclusion.
I see. I guess i will wait a bit to see if any issues will be reported by FreeCAD users in the following days. If not i will probably open a request on GitHub for inclusion.
It would be good to find a way to help Yorik with this. I saw your post in viewtopic.php?f=10&t=15926&start=20#p134609 I trust Yorik's judgement explicitly, but as the number of addons increases it places a even greater burden on him. A way to pre-screen these requests before submitting to yorik would be valuable IMHO. This is of course what you have done, but inexplicably there hasn't been much traffic? The functionality is often requested on the forum.
From code audit perspective i think we are pushing the limit. That is by using Git submodules likely only parts of code need to be looked at. Probably involving FreeCAD users to test upstream code before updating corresponding Git submodule could work out.
I am not sure to be honest and in the end i guess we will just have to wait and see. But first thing to sort out is i guess to have a package manager regular FreeCAD users will frequently use with ease.
I have found what seems to be a bug: I have set Part Design as my default FreeCAD workbench, so when I open FreeCAD it loads this one; if I close FreeCAD while on Draft workbench, the next time I open FreeCAD it loads that way:
As draftToolBar position wasn't yet configured it's considered to be a New toolbar to PersistentToolbars. Therefore it's on the top for user to notice it and to set its position accordingly. Now as for what is draftToolBar doing in PartDesign workbench. Some background on this. There are 4 toolbars that i am aware of that i guess we can call Python based toolbars. By default FreeCAD provides 2 in Draft/Arch. Such toolbars have their own mechanism to enable/disable them on workbench activation/deactivation. Therefore mechanism to store/restore toolbar position for such toolbars need to do that manually for them as it doesn't work "by default" compared to the rest of the toolbars.
Now i tested your use case and for me draftToolBar doesn’t show up in PartDesign. Therefore there must be some additional condition we yet have to discover. I was thinking you might have Draft/Arch module set as Autoload module in TabBar? In my tests i don't get the result you get but this is the only thing i can think of that could lead to such result.
P.S. As likely Draft/Arch workbench needs to be loaded before PartDesign workbench to get such results.
I have been working on PersistentToolbars in parallel with other FreeCAD related projects in the past weeks. I won't have much time in the following days therefore i decided to share the plan. I will first update the code on my GitHub (this or next weekend) and after it can be evaluated if the functionality should be upstreamed.
Testing and feedback will be welcomed.
There was one mayor issue and that is currently FreeCAD manages things like workbench toolbar visibility on C++ level. PersistentToolbars in addition manage toolbar position on workbench level (Python). I tried everything i could think of first on the PersistentToolbars level. After i changed the code on C++ level to let PersistentToolbars do most of the work. Nothing worked as toolbars and toolbar area flickered too much when changing workbench. In the end i discovered hidden toolbars form a grid in toolbar area and you must make sure to manage hidden toolbar position in addition to visible toolbar position. I choose the approach to always sort visible ones first and in addition move the hidden ones after them. That results in hidden toolbars when made visible to not pop up all over the visible toolbar area in unexpected places before positioned. In addition usually that doesn't results in expanding the toolbar area unnecessarily.
I decided to share this information if at some point in the future somebody else will be working on this to have some reference.
Thanks for your work on this. Hopefully it can be upstreamed into your Tux module because it increases the usability of FreeCAD a lot. So far I've had pretty good performance but if you want more testing of a dev branch I'd be glad to.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.